Evaluating Regular Path Queries on Compressed Adjacency Matrices

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Arroyuelo, Diego, Gómez-Brandón, Adrián, Navarro, Gonzalo
Format: Preprint
Publié: 2023
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866910419048726528
author Arroyuelo, Diego
Gómez-Brandón, Adrián
Navarro, Gonzalo
author_facet Arroyuelo, Diego
Gómez-Brandón, Adrián
Navarro, Gonzalo
contents Regular Path Queries (RPQs), which are essentially regular expressions to be matched against the labels of paths in labeled graphs, are at the core of graph database query languages like SPARQL. A way to solve RPQs is to translate them into a sequence of operations on the adjacency matrices of each label. We design and implement a Boolean algebra on sparse matrix representations and, as an application, use them to handle RPQs. Our baseline representation uses the same space as the previously most compact index for RPQs and outperforms it on the hardest types of queries -- those where both RPQ endpoints are unspecified. Our more succinct structure, based on $k^2$-trees, is 4 times smaller than any existing representation that handles RPQs, and still solves complex RPQs in a few seconds. Our new sparse-matrix-based representations dominate a good portion of the space/time tradeoff map, being outperformed only by representations that use much more space. They are also of independent interest beyond solving RPQs.
format Preprint
id arxiv_https___arxiv_org_abs_2307_14930
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle Evaluating Regular Path Queries on Compressed Adjacency Matrices
Arroyuelo, Diego
Gómez-Brandón, Adrián
Navarro, Gonzalo
Data Structures and Algorithms
Databases
Regular Path Queries (RPQs), which are essentially regular expressions to be matched against the labels of paths in labeled graphs, are at the core of graph database query languages like SPARQL. A way to solve RPQs is to translate them into a sequence of operations on the adjacency matrices of each label. We design and implement a Boolean algebra on sparse matrix representations and, as an application, use them to handle RPQs. Our baseline representation uses the same space as the previously most compact index for RPQs and outperforms it on the hardest types of queries -- those where both RPQ endpoints are unspecified. Our more succinct structure, based on $k^2$-trees, is 4 times smaller than any existing representation that handles RPQs, and still solves complex RPQs in a few seconds. Our new sparse-matrix-based representations dominate a good portion of the space/time tradeoff map, being outperformed only by representations that use much more space. They are also of independent interest beyond solving RPQs.
title Evaluating Regular Path Queries on Compressed Adjacency Matrices
topic Data Structures and Algorithms
Databases
url https://arxiv.org/abs/2307.14930