论文标题
图形数据库上的无上下文路径查询算法
An Algorithm for Context-Free Path Queries over Graph Databases
论文作者
论文摘要
RDF(资源描述框架)是一种代表图形数据库的标准语言。 RDF数据库的查询语言通常包括支持路径查询的基础,链接图形的顶点,这些顶点是由属于给定语言的标签的路径连接的。诸如SPARQL之类的语言包括对普通语言定义的路径(通过正则表达式)的支持。无上下文路径查询是一个路径查询,可以通过无上下文的语法来定义语言。可以使用无上下文路径查询来实现诸如“同一生成查询”之类的查询,这些查询无法通过正则表达式表达。在本文中,我们提出了一种用于无上下文路径查询处理的新颖算法。我们证明了方法的正确性,并显示了其运行时和记忆复杂性。我们通过在GO中实现的原型来显示我们方法的生存能力。我们使用与最近作品相同的研究案例运行原型,将结果与另一个最近发表的算法进行了比较。实验包括合成和实际RDF数据库。我们的算法可以看作是向前迈出的一步,朝着实施更具表现力的查询语言。
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.