arXiv:2606.14309cs.DBcs.AI2026-06

提出可组合查询的图模式推导方法,让变换后数据仍保持结构合法性。

Transforming Shape Schemas with Composable Property-Graph Queries (Extended Version)

  • 通过三重映射将属性图转换为逻辑形式,实现推理
  • 无需实例数据即可推导出任意输入图的输出模式
  • 适合需要保证图数据一致性与自动验证的系统设计者

属性图的模式约束可指导查询引擎和用户理解合法数据结构,形成数据提供方与消费方之间的契约。可组合的属性图查询会将输入图转换为输出图,随之产生新问题:经过一次或多次变换后,预期的模式是什么?本文研究在给定输入模式和变换查询的前提下,如何推导输出模式。具体地,我们提出一种推理流程,基于输入模式(以ProGS表示)和查询(以G-CORE表示),推导出输出模式。由于图更新频繁,该推理不依赖具体图实例,因此所生成的输出模式适用于所有符合输入模式的图。已有工作曾针对SPARQL CONSTRUCT查询解决此问题,通过描述逻辑(DL)编码,使输出模式由输入模式与查询推导出的公理所蕴含。但属性图及其查询更复杂,因其包含标签、属性注释及第一类边,必须使用重化机制,而现有描述逻辑无法直接编码这些特性。为此,我们提出一个映射族:(i) 将属性图重化为RDF;(ii) 将ProGS映射至SHACL;(iii) 将G-CORE映射至SPARQL CONSTRUCT查询。借助这一多层映射,将属性图的模式推理问题分解为可管理的形式,并利用高效的描述逻辑推理机完成计算。我们建立了关于推导模式正确性的元理论,以及映射后模式与查询的语义等价性。

原文摘要 · Abstract (English)

Property graphs may be constrained by schemas that inform both query engines and human users about the shape of valid data, enforcing a contract between data provider and consumer. Composable property-graph queries transform input graphs into output graphs. Then, the question arises of which schema can be expected after one (or several) transformation steps. We investigate how schema constraints can be inferred given an input schema and a transforming query. Specifically, we propose a reasoning procedure that, given an input schema in ProGS and a query in G-CORE infers an output schema. Since graph updates will happen frequently, our inference procedure does not rely on graph instances, such that the computed output schema applies to all graphs originating from any input graph complying with the input schema. Related work has addressed this problem for SPARQL CONSTRUCT queries, encoding it in Description Logics (DLs) so that the output schema is entailed by axioms inferred from input schema and queries. Property graphs and their queries, however, complicate the matter, as property graphs feature label and property annotations as well as first-class edges. Thus, reification has to be used in one way or another, though available DLs lack the means to encode such features directly. We approach this novel challenge via a family of mappings for i) property graphs reified in RDF, aligned with ii) a mapping from ProGS to SHACL and iii) a mapping from G-CORE to SPARQL CONSTRUCT queries. In this manner, schema inference for property graphs becomes manageable, as we break apart the problem through the extra mapping layer and utilize efficient DL reasoners. We develop the metatheory regarding the soundness of inferred schema constraints and the semantic equivalence of mapped schemas and queries.

图模式属性图推理语义

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。