Representing Paths in Graph Database Pattern Matching
Wim Martens, Matthias Niewerth, Tina Popp, Carlos Rojas, Stijn Vansummeren, Domagoj Vrgoc
Abstract
Modern graph database query languages such as GQL, SQL/PGQ, and their academic predecessor G-Core promote paths to first-class citizens in the sense that paths that match regular path queries can be returned to the user. This brings a number of challenges in terms of efficiency, caused by the fact that graphs can have a huge amount of paths between a given node pair. We introduce the concept of path multiset representations (PMRs), which can represent multisets of paths in an exponentially succinct manner. After exploring fundamental problems such as minimization and equivalence testing of PMRs, we explore how their use can lead to significant time and space savings when executing query plans. We show that, from a computational complexity point of view, PMRs seem especially well-suited for representing results of regular path queries and extensions thereof involving counting, random sampling, unions, and joins. CCS Concepts • Information systems → Query languages for non-relational engines; • Theory of computation → Database query languages (principles); Regular languages.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers2
- LLMLog: Advanced Log Template Generation via LLM-driven Multi-Round AnnotationFei Teng, Haoyang Li, Lei ChenVLDB 2025 · 2 citations
- DRPQ: Distributed Evaluation of Regular Path Queries On Streaming GraphsSiyuan Zhang, Kai Zhang, Zhenying He, Yinan Jing et al.SIGMOD 2026
Builds on1
Related papers
- A Unified Query Planning Framework for Conjunctive Regular Path QueriesYue Pang, Lei Zou, Angela Bonifati, M. Tamer Özsu et al.VLDB 2026
- Efficient Regular Simple Path Queries under Transitive Restricted ExpressionsQi Liang, Dian Ouyang, Fan Zhang, Jianye Yang et al.VLDB 2024 · 4 citations
- GQL and SQL/PGQ: Theoretical Models and Expressive PowerAmélie Gheerbrant, Leonid Libkin, Liat Peterfreund, Alexandra RogovaVLDB 2025 · 16 citations
- Materialized View Selection & View-Based Query Planning for Regular Path QueriesYue Pang, Lei Zou, Jeffrey Xu Yu, Linglin YangSIGMOD 2024 · 7 citations
- Temporal Regular Path QueriesMarcelo Arenas, Pedro Bahamondes, Amir Aghasadeghi, Julia StoyanovichICDE 2022 · 11 citations
