Graph Query Language
GQL (Graph Query Language) is a standardized query language for property graphs first described in ISO/IEC 39075, released in April 2024 by ISO/IEC.
GQL (Graph Query Language) is a standardized query language for property graphs first described in ISO/IEC 39075, released in April 2024 by ISO/IEC. ==Extending existing graph query languages== The GQL project draws on multiple sources or inputs, notably existing industrial languages and a new section of the SQL standard. In preparatory discussions within WG3 surveys of the history and comparative content of some of these inputs were presented. GQL is a declarative language with its own distinct syntax, playing a similar role to SQL in the building of a database application. Other graph query languages have been defined which offer direct procedural features such as branching and looping (Apache Tinkerpop's Gremlin ), and GSQL, making it possible to traverse a graph iteratively to perform a class of graph algorithms, but GQL will not directly incorporate such features. However, GQL is envisaged as a specific case of a more general class of graph languages, which share a graph type system and a calling interface for procedures that process graphs. ====Querying with visual path patterns==== Cypher uses compact fixed- and variable-length patterns which combine visual representations of node and relationship (edge) topologies, with label existence and property value predicates. (These patterns are usually referred to as "ASCII art" patterns, and arose originally as a way of commenting programs which used a lower-level graph API. ) By matching such a pattern against graph data elements, a query can extract references to nodes, relationships and paths of interest. Those references are emitted as a "binding table" where column names are bound to a multiset of graph elements. The name of a column becomes the name of a "binding variable", whose value is a specific graph element reference for each row of the table. For example, a pattern will generate a two-column output table. The first column named will contain references to nodes with a label . The second column named will contain references to nodes with a label , denoting the city where the person lives. The binding variables and can then be dereferenced to obtain access to property values associated with the elements referred to by a variable. The example query might be terminated with a , resulting in a complete query like this: MATCH (p:Person)-[:LIVES_IN]->(c:City) RETURN p.first_name, p.last_name, c.name, c.state This would result in a final four-column table listing the names of the residents of the cities stored in the graph. Pattern-based queries are able to express joins, by combining multiple patterns which use the same binding variable to express a natural join using the clause: MATCH (p:Person)-[:LIVES_IN]->(c:City), (p:Person)-[:NATIONAL_OF]->(EUCountry) RETURN p.first_name, p.last_name, c.name, c.state This query would return the residential location only of EU nationals. An outer join can be expressed by : MATCH (p:Person)-[:LIVES_IN]->(c:City) OPTIONAL MATCH (p:Person)-[:NATIONAL_OF]->(ec:EUCountry) RETURN p.first_name, p.last_name, c.name, c.state, ec.name This query would return the city of residence of each person in the graph with residential information, and, if an EU national, which country they come from. Queries are therefore able to first project a sub-graph of the graph input into the query, and then extract the data values associated with that subgraph. Data values can also be processed by functions, including aggregation functions, leading to the projection of computed values which render the information held in the projected graph in various ways. Following the lead of G-CORE and Morpheus, GQL aims to project the sub-graphs defined by matching patterns (and graphs then computed over those sub-graphs) as new graphs to be returned by a query. From a broad perspective, GQL monitors three key elements during query evaluation and execution: the active graph - the property graph currently being used for pattern matching; the active table - where computed information up to this point is stored; and the active record - which holds the result tuple currently in use. Patterns of this kind have become pervasive in property graph query languages, and are the basis for the advanced pattern sub-language being defined in SQL/PGQ, which is likely to become a subset of the GQL language. Cypher also uses patterns for insertion and modification clauses ( and ), and proposals have been made in the GQL project for collecting node and edge patterns to describe graph types. ====Cypher 9 and Cypher 10==== The current version of Cypher (including the temporal extension) is referred to as Cypher 9. Prior to the GQL project it was planned to create a new version, Cypher 10 [REF HEADING BELOW], that would incorporate features like schema and composable graph queries and views. The first designs for Cypher 10, including graph construction and projection, were implemented in the Cypher for Apache Spark project starting in 2016. === G-CORE=== G-CORE is a research language designed by a group of academic and industrial researchers and language designers which draws on features of Cypher, PGQL and SPARQL. The project was conducted under the auspices of the Linked Data Benchmark Council (LDBC), starting with the formation of a Graph Query Language task force in late 2015, with the bulk of the work of paper writing occurring in 2017. G-CORE is a composable language which is closed over graphs: graph inputs are processed to create a graph output, using graph projections and graph set operations to construct the new graph. G-CORE queries are pure functions over graphs, having no side effects, which mean that the language does not define operations which mutate (update or delete) stored data. G-CORE introduces views (named queries). It also incorporates paths as elements in a graph ("paths as first class citizens"), which can be queried independently of projected paths (which are computed at query time over node and edge elements). G-CORE has been partially implemented in open-source research projects in the LDBC GitHub organization.
References
- ^ "Iso/Iec 39075:2024" . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ "GQL query statements | Spanner" . Google Cloud Documentation . Retrieved 2026-05-27 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1779836400.0
- ^ " Scope from the original standard, ISO 9075-1987, Database Language SQL " . ISO/IEC JTC1 . Retrieved November 9, 2019 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ "ISO/IEC 9075-16:2023" . ISO . Retrieved 2026-08-20 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1787180400.0
- ^ "SQL:2023 has been released | Hacker News" . news.ycombinator.com . Archived from the original on 2025-05-14 . Retrieved 2026-08-20 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1787180400.0
- ^ "SQL:2023 is finished: Here is what's new | Hacker News" . news.ycombinator.com . Archived from the original on 2025-12-07 . Retrieved 2026-08-20 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1787180400.0
- ^ Deutsch, Alin; Francis, Nadime; Green, Alastair; Hare, Keith; Li, Bei; Libkin, Leonid; Lindaaker, Tobias; Marsault, Victor; Martens, Wim; Michels, Jan; et al. (2021-12-12). "Graph Pattern Matching in GQL and SQL/PGQ". arXiv : 2112.06217 [ cs.DB ]. Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ Deutsch, Alin; Francis, Nadime; Green, Alastair; Hare, Keith; Li, Bei; Libkin, Leonid; Lindaaker, Tobias; Marsault, Victor; Martens, Wim; Michels, Jan; Murlak, Filip; Plantikow, Stefan; Selmer, Petra; van Rest, Oskar; Voigt, Hannes (2022-06-11). "Graph Pattern Matching in GQL and SQL/PGQ" . Proceedings of the 2022 International Conference on Management of Data . SIGMOD '22. New York, NY, USA: Association for Computing Machinery. pp. 2246– 2258. doi : 10.1145/3514221.3526057 . ISBN 978-1-4503-9249-5 . S2CID 245124268 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ "ISO/IEC 39075 Information Technology — Database Languages — GQL" . ISO . Retrieved January 7, 2022 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ "SC32 WG3 N282 "SC32 N3002 Draft NWIP Form4 Information Technology – Database Languages - GQL" " . ISO . Retrieved December 9, 2019 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ "ISO/IEC 39075:2024 Information technology — Database languages — GQL" . ISO . Retrieved 25 May 2024 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ "A Semantics of GQL; a New Query Language for Property Graphs Formalized" (PDF) . Olof Morra . Retrieved January 18, 2021 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ a b Rydberg, Mats; et al. (July 2016). " Morpheus brings the leading graph query language, Cypher, onto the leading distributed processing platform, Spark. " . openCypher . Retrieved November 3, 2019 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ a b Kiessling, Max (2019). " Multiple graphs and composable queries in Cypher for Apache Spark . openCypher Implementers Meeting V, Berlin" (PDF) . opencypher.org . Retrieved November 9, 2019 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ Green, Alastair (July 2016). " Creating an Open Industry Standard for a Declarative Property Graph Query Language " (PDF) . opencypher.org . Retrieved November 12, 2019 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ Francis, Nadime; et al. (27 May 2018). "Cypher: An Evolving Query Language for Property Graphs". Proceedings of the 2018 International Conference on Management of Data . ACM. pp. 1433– 1445. doi : 10.1145/3183713.3190657 . ISBN 9781450347037 . S2CID 13919896 . Retrieved October 25, 2019 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ " Cypher Query Language Reference (Version 9) " (PDF) . opencypher.org . Retrieved November 10, 2019 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ " openCypher Resources " . ACM . Retrieved November 10, 2019 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ " CIP2015-08-06 - Date and Time " . opencypher.org. 15 May 2019 . Retrieved October 25, 2019 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ a b Johanssen, Tobias; et al. (2019). " graphddl-example-ldbc: A cypher-for-apache-spark example showing the use of SqlPropertyGraphSource and GraphDDL to provide a property graph view of a SQL dataset " . GitHub . Retrieved November 9, 2019 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ Libkin, Leonid. " Formal Semantics Working Group " . Retrieved November 12, 2019 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ "First GQL research implementation from Olof Morra at TU Eindhoven!" . Alastair Green . Retrieved January 18, 2021 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ Angles, Renzo; et al. (2018). "G-CORE: A Core for Future Graph Query Languages" . Proceedings of the 2018 International Conference on Management of Data . ACM. pp. 1421– 1432. doi : 10.1145/3183713.3190654 . ISBN 978-1-4503-4703-7 . S2CID 4623760 . Retrieved November 9, 2019 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ Ciocîrdel, Georgiana Diana; Boncz, Peter (2017). " G-CORE interpreter on Spark " . LDBC . Retrieved November 12, 2019 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ van Rest, Oskar (2017). " G-CORE Grammar and Parser " . LDBC . Retrieved November 12, 2019 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ Ciocîrdel, Georgiana Diana (2018). " A G-CORE (Graph Query Language) Interpreter , Master's Thesis in Parallel and Distributed Computer Systems, CWI and Vrije Universiteit Amsterdam" (PDF) . CWI . Retrieved November 12, 2019 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ Voigt, Hannes (February 2018). " G-CORE: The LDBC Graph Query Language Proposal . In archives of FOSDEM 2018" . Retrieved November 12, 2019 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ " GQL Community Updates " . Retrieved November 12, 2019 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ Eds. Plantikow, Stefan; Cannan, Stephen (October 2019). " GQL Early Working Draft v2.2 " . ISO . Retrieved November 9, 2019 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ "GQL Parser" . GitHub . Retrieved January 18, 2021 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ Angles, Renzo; et al. (September 2017). "Foundations of Modern Query Languages for Graph Databases" . ACM Computing Surveys . 50 (5). ACM: 68:1–40. arXiv : 1610.06264 . doi : 10.1145/3104031 . S2CID 13526884 . Retrieved November 12, 2019 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ a b Lindaaker, Tobias (May 2018). " An overview of the recent history of Graph Query Languages " (PDF) . opencypher.org . Retrieved October 6, 2019 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ " GSQL documentation Tigergraph 1.0 " . 2017 . Retrieved November 9, 2019 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ " Multigraphs , TigerGraph Online Documentation" . June 2019 . Retrieved January 7, 2022 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ " Pattern Matching , TigerGraph 2.4 Release Notes" . June 2019 . Retrieved November 9, 2019 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ a b Wu, Mingxi; Deutsch, Alin. " GSQL: An SQL-Inspired Graph Query Language " . Retrieved November 9, 2019 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ Rodriguez, Marko A. (2015). "The Gremlin graph traversal machine and language (Invited talk)". Proceedings of the 15th Symposium on Database Programming Languages . ACM. pp. 1– 10. arXiv : 1508.03843 . doi : 10.1145/2815072.2815073 . ISBN 9781450339025 . S2CID 32623848 . Retrieved November 10, 2019 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ Trigonakis, Vasileios (July 2019). " Property graph extensions for the SQL standard . LDBC 12th TUC" (PDF) . LBDC . Retrieved January 7, 2022 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ Taylor, Andrés; Plantikow, Stefan; Selmer, Petra (2017–2018). " CIP2017-06-18 Querying and constructing multiple graphs " . opencypher.org . Retrieved November 12, 2019 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ van Rest, Oskar; et al. (June 2016). "PGQL: A property graph query language" . Proceedings of the Fourth International Workshop on Graph Data Management Experiences and Systems . ACM. pp. 1– 6. doi : 10.1145/2960414.2960421 . ISBN 978-1-4503-4780-8 . S2CID 6806901 . Retrieved October 25, 2019 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ Roth, Nicholas P.; et al. (2017). "PGX.D/Async: A Scalable Distributed Graph Pattern Matching Engine" . Proceedings of the Fifth International Workshop on Graph Data-management Experiences & Systems . ACM. pp. 1– 6. doi : 10.1145/3078447.3078454 . ISBN 978-1-4503-5038-9 . S2CID 26283328 . Retrieved October 29, 2019 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ van Rest, Oskar; et al. (September 2015). " PGQL is an SQL-based query language for the Property Graph data model " . pgql.org . Retrieved November 3, 2019 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ "PGQL" . pgql.org . Retrieved October 6, 2019 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ Voigt, Hannes; Selmer, Petra; Lindaaker, Tobias; Plantikow, Stefan; Green, Alastair; Furniss, Peter (December 2018). " Property Graph Schema , ANSI INCITS DM32.2 SQL Property Graph Extensions Ad Hoc submission sql-pg-2018-0056r1 , Neo4j Query Languages Standards and Research Team" (PDF) . openCypher.org . Retrieved November 12, 2019 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ "JTC 1/SC 32 Data Management and Interchange" . ISO/IEC JTC1 . Retrieved October 6, 2019 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ " Query language extensions , Graph processing with SQL Server and Azure SQL Database" . Microsoft Inc. 2017 . Retrieved November 10, 2019 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ "ISO/IEC 9075-16 Information technology — Database languages SQL — Part 16: SQL Property Graph Queries (SQL/PGQ)" . ISO . Retrieved January 7, 2022 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ Plantikow, Stefan (May 2018). " Summary Chart of Cypher, PGQL, and G-Core " (PDF) . opencypher.org . Retrieved November 3, 2019 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ "Apache Tinkerpop" . Apache Software Foundation . Retrieved November 11, 2019 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ a b Green, Alastair (July 2018). " Working towards a New Work Item for GQL, to complement SQL PGQ , ANSI INCITS DM32.2 submission DM32.2-2018-00128r1 " (PDF) . opencypher.org . Retrieved November 12, 2019 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ a b Hare, Keith; et al. (March 2019). " SQL and GQL , W3C Workshop on Web Standardization for Graph Data. Creating Bridges: RDF, Property Graph and SQL" (PDF) . W3C . Retrieved October 6, 2019 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ Wood, Peter T. (25 April 2012). "Query languages for graph databases" . ACM SIGMOD Record . 41 (1). ACM: 50– 60. doi : 10.1145/2206869.2206879 . S2CID 13537601 . Retrieved October 25, 2019 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- ^ " GQL Standard " . Retrieved November 12, 2019 . Wikipedia revision 1375066203, retrieved 2026-11-18 · 1794956400.0
- Wikipedia “Graph Query Language” revision 1375066203 · retrieved 2026-10-20 release date (×1) · confidence 0.95 revision URL · 1792450800.0
Cite this
"Graph Query Language". 1789485449. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1375066203 JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy