An Algorithm for Context-Free Path Queries over Graph Databases

04/07/2020
by   Ciro M. Medeiros, et al.
0

RDF (Resource Description Framework) is a standard language to represent graph databases. Query languages for RDF databases usually include primitives to support path queries, linking pairs of vertices of the graph that are connected by a path of labels belonging to a given language. Languages such as SPARQL include support for paths defined by regular languages (by means of Regular Expressions). A context-free path query is a path query whose language can be defined by a context-free grammar. Context-free path queries can be used to implement queries such as the "same generation queries", that are not expressible by Regular Expressions. In this paper, we present a novel algorithm for context-free path query processing. We prove the correctness of our approach and show its run-time and memory complexity. We show the viability of our approach by means of a prototype implemented in Go. We run our prototype using the same cases of study as proposed in recent works, comparing our results with another, recently published algorithm. The experiments include both synthetic and real RDF databases. Our algorithm can be seen as a step forward, towards the implementation of more expressive query languages.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
02/05/2018

Can One Escape Red Chains? Regular Path Queries Determinacy is Undecidable

For a given set of queries (which are expressions in some query language...
research
07/04/2017

Context-Free Path Querying by Matrix Multiplication

Graph data models are widely used in many areas, for example, bioinforma...
research
03/26/2021

One Algorithm to Evaluate Them All: Unified Linear Algebra Based Approach to Evaluate Both Regular and Context-Free Path Queries

The Kronecker product-based algorithm for context-free path querying (CF...
research
09/20/2023

A Unifying Perspective on Succinct Data Representations

Factorized Databases (FDBs) and the recently introduced Path Multiset Re...
research
06/03/2023

Evaluating Regular Path Queries in GQL and SQL/PGQ: How Far Can The Classical Algorithms Take Us?

We tackle the problem of answering regular path queries over graph datab...
research
11/12/2021

Regular Path Query Evaluation Sharing a Reduced Transitive Closure Based on Graph Reduction

Regular path queries (RPQs) find pairs of vertices of paths satisfying g...
research
10/10/2018

Understanding Data Science Lifecycle Provenance via Graph Segmentation and Summarization

Increasingly modern data science platforms today have non-intrusive and ...

Please sign up or login with your details

Forgot password? Click here to reset