PostgreSQL as a Graph Database: Who Grabbed a Beer Together?
summary
Shows how PostgreSQL plus the Apache AGE extension runs graph queries via openCypher, ingesting Untappd check‑ins and PGConf speaker accounts to build nodes, edges and shortest‑path queries. Live demo creates users and friend edges, visualizes with react-graph-force, and returns two‑hop shortest paths. Claims real projects migrated from Neo4j and handle up to 1 billion rows, with PostgreSQL about 20% slower but fully functional using regular indexes and conditional indexing.
AI-written summary · about
chapters (28)
- 0:00Introduction and speaker intro
- 0:26Talk overview and personal intro
- 1:51Social media data example
- 3:59Graphs vs relational tables
- 7:14When graphs are useful
- 8:39OpenCypher syntax in PostgreSQL
- 9:42Setting up the graph extension
- 11:27Creating a graph in PostgreSQL
- 13:15Working with vertices
- 15:26Inserting data with openCypher
- 16:49Combining SQL and graph queries
- 17:34Performance considerations
- 18:19Querying vertices with SQL
- 18:45Querying with openCypher
- 19:29Creating edges between users
- 21:46How graphs store data internally
- 22:53Adding multiple users and connections
- 24:42Aggregation and shortest paths
- 26:10Finding shortest paths in graphs
- 28:01Ordering and filtering paths
- 29:48Cleaning up the graph
- 30:10Query syntax recap
- 31:41Alternative graph extensions in PostgreSQL
- 33:11Apache project benefits
- 33:51Building a beer-graph community map
- 36:01Privacy and data sharing concerns
- 37:52Call to action and closing
- 38:15Q&A session starts
related talks
22mQuerying & Visualizing Graphs in Postgres with Apache AGE
34mApache AGE
45mBuilding Scalable APIs: PostgreSQL Meets GraphQL
41mPostgreSQL is (probably) all you need
45mGraph databases, PostgreSQL and SQL/PGQ
31mMaking Data Dance
27mExploring property graphs with SQL/PGQ in PostgreSQL
34mAnalytics and AI with PostgreSQL - Mission Possible!
