Titelangaben
Hammerer, Janik ; Martens, Wim:
A Compendium of Regular Expression Shapes in SPARQL Queries.
In: Arora, Akhil ; Dumbrava, Stefania
(Hrsg.):
Proceedings of the 8th Joint Workshop on Graph Data Management Experiences & Systems (GRADES) and Network Data Analytics (NDA). -
New York, NY
: Association for Computing Machinery
,
2025
. - 4
ISBN 979-8-4007-1923-3
DOI: https://doi.org/10.1145/3735546.3735853
Abstract
Regular path queries (RPQs) are at the heart of navigational queries in graph databases. Motivated by new features of regular path queries in the languages Cypher, GQL, and SQL/PGQ, which require new approaches for indexing and compactly storing intermediate query results, we investigate a large corpus of real-world RPQs. Our corpus consists of 148.7 million RPQs occurring in 937.2 million SPARQL queries, used on 29 different data sets.We investigate three main questions on these logs. First, what is the syntactic structure of these RPQs? Second, how much non-determinism (or ambiguity) do they have? Third, do they admit tractable evaluation under simple path and trail semantics?Concerning the first question, we show that all the RPQs can be classified in only 572 different syntactic shapes, which we provide in a downloadable data set in Zenodo. Furthermore, we classify the relative use of various RPQ operators, and popular predicates that are used for transitive navigation. Concerning the second question, we show that although non-determinism occurs in the RPQs, less than one in ten million requires a deterministic finite automaton with more states than the size of the regular expression. This is remarkable because this blow-up is known to be exponential in the worst case. Concerning the last question, the vast majority of expressions admits tractable evaluation.

bei Google Scholar