Exploring property graphs with SQL/PGQ in PostgreSQL
summary
Shows how PostgreSQL 19 committed basic SQL/PGQ to overlay a property graph on relational tables using a Ticket to Ride schema, mapping cities/countries to vertex tables and routes to edge tables, then querying with GRAPH_TABLE and MATCH patterns. Explains transformation of patterns into element tables and unions of joins, notes label disjunction causes exponential SQL growth, distinguishes implemented features (labels, MATCH, aggregates across paths) from under‑design variable‑length acyclic checks and a proposed patch for multiple path patterns.
AI-written summary · about
chapters (12)
- 0:00Music & introduction
- 2:11Building relational schema using a Ticket to Ride example
- 5:19Creating property graphs in PostgreSQL
- 6:57Vertex, edge tables, & labels explained
- 9:49PostgreSQL features color coding
- 10:28Writing graph queries with MATCH: vertex and edge patterns
- 14:14How graph queries become SQL
- 17:14Additional features: label disjunction, variable length paths, & aggregates
- 22:00Multiple path patterns
- 23:25Quiz: write your own query
- 24:07Limitations of SQL/PGQ & Apache/AGE extension
- 26:13Quiz answer & wrap up
related talks
45mGraph databases, PostgreSQL and SQL/PGQ
31mWhen property graphs join SQL
06mUnlocking graph analytics in DuckDB with SQL/PGQ
25mSimplify Property Graphs Using SQL with Database 23ai
46mPostgreSQL as a Graph Database: Who Grabbed a Beer Together?
29mAll about graphs in Database
07mQuery A Graph with ASCII ART
51mExploring Postgres Databases with Graphs
