We survey foundational features underlying modern graph query languages. We first discuss two popular graph data models: edge-labelled graphs, where nodes are connected by directed, labelled edges; and property graphs, where nodes and edges can further have attributes. Next we discuss the two most fundamental graph querying functionalities: graph patterns and navigational expressions. We start with graph patterns, in which a graph-structured query is matched against the data. Thereafter we discuss navigational expressions, in which patterns can be matched recursively against the graph to navigate paths of arbitrary length; we give an overview of what kinds of expressions have been proposed, and how they can be combined with graph patterns. We also discuss several semantics under which queries using the previous features can be evaluated, what effects the selection of features and semantics has on complexity, and offer examples of such features in three modern languages that are used to query graphs: SPARQL, Cypher and Gremlin. We conclude by discussing the importance of formalisation for graph query languages; a summary of what is known about SPARQL, Cypher and Gremlin in terms of expressivity and complexity; and an outline of possible future directions for the area.
翻译:我们首先调查现代图形查询语言的基础特征。 我们首先讨论两种流行的图形数据模型: 边缘标签图形, 节点通过定向、 标签边缘连接; 属性图形, 节点和边缘可以进一步具有属性。 接下来我们讨论两个最基本的图形查询功能: 图形模式和导航表达式。 我们先从图形模式开始, 图形结构查询与数据匹配。 然后我们讨论导航表达式, 其模式可以与图表相对应, 从而与任意长度的导航路径相匹配; 我们概述哪些类型的表达式已经提出, 以及如何与图表模式相结合。 我们还讨论一些语义学, 根据该语义, 使用先前的特征和边缘可以进行评估, 选择特征和语义对复杂性有何影响, 并以三种现代语言提供这些特征的例子, 用于查询图表: SPARQL、 Cypher 和 Gremlin。 我们最后通过讨论图形查询语言的正规化重要性; 关于 SPARQL、 Cypher和Gremlin 的已知内容摘要, 以及未来表达性和复杂性的可能方向的概要。