We tackle the problem of answering regular path queries over graph databases, while simultaneously returning the paths which witness our answers. We study this problem under the arbitrary, all-shortest, trail, and simple-path semantics, which are the common path matching semantics considered in the research literature, and are also prescribed by the upcoming ISO Graph Query Language (GQL) and SQL/PGQ standards. In the paper we present how the classical product construction from the theoretical literature on graph querying can be modified in order to allow returning paths. We then discuss how this approach can be implemented, both when the data resides in a classical B+ tree structure, and when it is assumed to be available in main memory via a compressed sparse row representation. Finally, we perform a detailed experimental study of different trade-offs these algorithms have over real world queries, and compare them with existing approaches.
翻译:我们解决在图形数据库上回答正则路径查询的问题,同时返回见证我们答案的路径。我们在任意、全最短、轨迹和简单路径语义下研究该问题,这些是研究文献中考虑的常见路径匹配语义,也是即将发布的ISO图形查询语言(GQL)和SQL/PGQ标准中规定的。在论文中,我们展示了如何修改图查询理论文献中的经典乘积构造,以允许返回路径。然后,我们讨论了该方法在数据驻留在经典B+树结构中以及假设通过压缩稀疏行表示在主内存中可用时的实现方式。最后,我们对这些算法在实际查询中的不同权衡进行了详细的实验研究,并将其与现有方法进行了比较。