We study a relational perspective of graph database querying. Such a perspective underlies various graph database systems but very few theoretical investigations have been conducted on it. This perspective offers a powerful and unified framework to study graph database querying, by which algorithms and complexity follow from classical results. We provide two concrete applications. The first is querying property graphs. The property graph data model supersedes previously proposed graph models and underlies the new standard GQL for graph query languages. We show that this standard can be, by and large, expressed by extensions of relational calculus with transitive closure operators (FO[TC]) and existential second-order quantifiers (ESO). With this, we obtain optimal data complexity bounds, along with extensions including schema validation. The second application is incorporating data from concrete domains (e.g., numbers) in graph database querying. We use embedded finite model theory and, by exploiting a generic Restricted Quantifier Collapse (RQC) result for FO[TC] and ESO, we obtain optimal data complexity bounds for GQL with arithmetics and comparisons. Moreover, we show that Regular Data Path Querying with operations on data (i.e. using register automata formalisms) can be captured in FO[TC] over embedded finite graphs while preserving nondeterministic logspace data complexity.
翻译:我们研究图数据库查询的关系视角。这一视角是多种图数据库系统的基础,但相关的理论研究却极为有限。该视角为研究图数据库查询提供了一个强大而统一的框架,基于此,算法与复杂性可从经典结果中推导得出。我们提供了两个具体应用。其一是属性图查询。属性图数据模型超越了先前提出的图模型,并构成了图查询语言新标准GQL的基础。我们证明,该标准在很大程度上可以通过扩展关系演算(包含传递闭包算子FO[TC]和存在二阶量词ESO)来表达。由此,我们获得了最优的数据复杂度界限,并扩展了包括模式验证在内的功能。第二个应用是在图数据库查询中整合来自具体领域(例如数字)的数据。我们利用嵌入式有限模型理论,并通过利用FO[TC]和ESO的一个通用受限量词坍缩(RQC)结果,获得了支持算术与比较运算的GQL的最优数据复杂度界限。此外,我们证明,带有数据操作(即使用寄存器自动机形式体系)的常规数据路径查询可以在嵌入式有限图上用FO[TC]捕获,同时保持非确定性对数空间的数据复杂度。