G-CORE: A Core for Future Graph Query Languages

Renzo Angles, Marcelo Arenas, Pablo Barceló, Peter Boncz, George H. L. Fletcher, Claudio Gutierrez, Tobias Lindaaker, Marcus Paradies, Stefan Plantikow, Juan F. Sequeda, Oskar van Rest, Hannes Voigt

Abstract

G-CORE is a proposed foundational graph query language designed to bridge the gap between academic theory and industrial practice. It introduces a "graph-in, graph-out" composable framework and treats paths as first-class citizens, ensuring that complex graph traversals remain computationally efficient (tractable) while offering high expressivity. This paper outlines the design choices made by the Linked Data Benchmark Council (LDBC) to create a unified, formal standard for graph data.

Introduction: The Search for a Graph SQL

Despite the explosion of graph databases like Neo4j, AWS Neptune, and ArangoDB, the field has lacked a unified, formal standard equivalent to SQL for relational databases. Existing languages often suffer from two major issues: a lack of composability and limited path handling. Most current languages return tables or lists, making it difficult to "pipe" query outputs or create complex views. Furthermore, while paths are central to graph data, they are often treated as secondary results, making it difficult to store metadata about them or calculate weighted properties.

Industrial requirements for graph query languages across various application fields and features.

The tension between expressivity and complexity is a constant challenge; powerful path queries can inadvertently trigger NP-complete evaluation times on large datasets. G-CORE addresses these needs by prioritizing features like reachability and graph construction, which are highly demanded across sectors like healthcare, publishing, and finance.

The G-CORE Design Philosophy

The authors, representing the Linked Data Benchmark Council (LDBC) Task Force, propose several novel design choices to overcome these hurdles:

The Path Property Graph (PPG) Model

G-CORE extends the standard property graph model into the Path Property Graph (PPG) model. In a PPG, a path is a first-class citizen with its own identity. It can be assigned labels and store property-value pairs just like a node or an edge. For example, a path can store a "trust score" or a calculated cost, allowing users to perform complex analytics—like finding the "cheapest" route—directly within the query syntax.

The Path Property Graph (PPG) model treats paths as first-class citizens, allowing them to have labels and properties like 'trust'.

Graph-to-Graph Queries and Composability

Every G-CORE query uses a CONSTRUCT clause, ensuring the output is always a graph. This "graph-in, graph-out" approach allows for seamless query nesting and the creation of persistent graph views. Users can build temporary transformation graphs during a query session without altering the underlying database.

Tractable Path Semantics

To ensure the language is "tractable" (evaluable in polynomial time), G-CORE avoids "simple path" semantics, which are computationally expensive. Instead, it uses semantics that allow for efficient Dijkstra-style evaluation. By carefully restricting how path variables are bound, G-CORE offers the power of Regular Path Queries (RPQs) while guaranteeing efficiency even on massive industrial-scale graphs.

Use Cases and Benchmarking

The paper utilizes the LDBC Social Network Benchmark (SNB) to demonstrate G-CORE’s capabilities. Although the paper is primarily a design proposal, it uses the SNB schema to walk through complex real-world scenarios, including data integration across multiple graphs, "expert finding" using weighted shortest paths, and social network reachability analysis.

Conclusion and Future Directions

G-CORE provides a rigorous mathematical foundation and a formal grammar for future graph query languages. Its most significant achievement is the consensus between major industry players (Oracle, Neo4j, SAP) and leading researchers. While G-CORE is a design rather than a finished engine, it is intended to guide the evolution of future standards, such as the upcoming ISO GQL standard. Future work will focus on full integration with SQL and refining features like graph recursion and complex aggregation.

Summary updated

BibTeX
@inproceedings{angles2018g,
  author = {Renzo Angles and Marcelo Arenas and Pablo Barceló and Peter Boncz and George H. L. Fletcher and Claudio Gutierrez and Tobias Lindaaker and Marcus Paradies and Stefan Plantikow and Juan F. Sequeda and Oskar van Rest and Hannes Voigt},
  title = {{G-CORE: A Core for Future Graph Query Languages}},
  booktitle = {SIGMOD},
  year = {2018},
  doi = {10.1145/3183713.3190654},
}
Figure