Content deleted Content added
remove duplicate Short description template |
→ISO stages: wikitable |
||
(23 intermediate revisions by 9 users not shown) | |||
Line 1:
{{Short description|
{{Multiple issues|
{{Overly detailed|date=March 2020}}
{{Self-published|date=March 2020}}
{{missing information|the language itself: syntax, examples ([https://cloud.google.com/spanner/docs/reference/standard-sql/graph-query-statements google cloud documentation] might help)|date=July 2025}}
}}
{{distinguish|text=[[GraphQL]] for querying APIs}}
Line 9 ⟶ 10:
| paradigm = [[Declarative programming|Declarative]]
| family = [[Query language]]
| released = {{Start date and age|April
| developer = [[ISO/IEC JTC 1/SC 32|ISO/IEC JTC 1 (Joint Technical Committee 1) / SC 32 (Subcommittee 32)]] / WG 3 (Working Group 3)
| website = {{URL|https://www.iso.org/standard/76120.html}}
| latest_release_version = {{URL|https://www.iso.org/standard/76120.html|ISO/IEC 39075:2024}}
| latest_release_date = {{Start date and age|April
| influenced_by = [[SQL]], [[Cypher (query language)|Cypher]], [[TigerGraph|GSQL]]
}}
'''GQL''' ('''Graph Query Language''') is a [[Technical_standard|standardized]] [[query language]] for [[
== History ==
The GQL project is the culmination of converging initiatives dating back to 2016, particularly a private proposal from [[Neo4j]] to other [[database]] vendors in July 2016,<ref name="Creating standard">{{cite web|url=https://s3.amazonaws.com/artifacts.opencypher.org/website/materials/DM32.2/DM32.2-2018-00144.Creating+an+Open+Industry+Standard+for+a+Declarative+Property+Graph+Query+Language.pdf|title=''Creating an Open Industry Standard for a Declarative Property Graph Query Language''|last1=Green|first1=Alastair|date=July 2016|publisher=opencypher.org|access-date=November 12, 2019}}</ref> and a proposal from [[Oracle_Corporation|Oracle]] technical staff within the ISO/IEC JTC 1 standards process later that year.<ref name="Towards NWIP">{{cite web|url=https://s3.amazonaws.com/artifacts.opencypher.org/website/materials/DM32.2/DM32.2-2018-00128r1.Working+towards+a+GQL+NWIP.pdf|title=''Working towards a New Work Item for GQL, to complement SQL PGQ'', ANSI INCITS DM32.2 submission ''DM32.2-2018-00128r1''|last1=Green|first1=Alastair|date=July 2018|publisher=opencypher.org|access-date=November 12, 2019}}</ref>
=== 2019 GQL project proposal ===
In September 2019 a proposal for a project to create a new standard [[Graph_(discrete_mathematics)|graph]] query language (ISO/IEC 39075 Information Technology — Database Languages — GQL)<ref name="39075 GQL">{{cite web|title=ISO/IEC 39075 Information Technology — Database Languages — GQL|url=https://www.iso.org/standard/76120.html|access-date=January 7, 2022|publisher=ISO}}</ref> was approved by a vote of national standards bodies which are members of ISO/IEC Joint Technical Committee 1([https://jtc1info.org/page-3/ ISO/IEC JTC 1]). JTC 1 is responsible for international Information Technology standards. GQL is intended to be a declarative database query language, like [[SQL]].
The 2019 GQL project proposal states:
{{blockquote|text="Using graph as a fundamental representation for [[data modeling]] is an emerging approach in [[data management]]. In this approach, the [[data set]] is modeled as a graph, representing each data entity as a [[Vertex_(graph_theory)|vertex]] (also called a node) of the graph and each relationship between two entities as an [[Glossary_of_graph_theory#edge|edge]] between corresponding vertices. The graph data model has been drawing attention for its unique advantages.
Firstly, the graph model can be a natural fit for data sets that have hierarchical, complex, or even arbitrary structures. Such structures can be easily encoded into the graph model as edges. This can be more convenient than the relational model, which requires the [[Database normalization|normalization]] of the data set into a set of [[Table_(database)|tables]] with fixed [[Row_(database)|row]] types.
Secondly, the graph model enables efficient execution of expensive queries or data analytic functions that need to observe multi-hop relationships among data entities, such as [[Reachability analysis|reachability queries]], [[Shortest path problem|shortest or cheapest path queries]], or [[centrality]] analysis. There are two graph models in current use: the [[Resource Description Framework]] (RDF) model and the Property Graph model. The RDF model has been standardized by W3C in a number of specifications. The Property Graph model, on the other hand, has a multitude of implementations in [[graph
==== Official ISO standard ====
Line 37 ⟶ 38:
=== GQL project organisation ===
The GQL project is led by [https://de.linkedin.com/in/stefan-plantikow-49896637 Stefan Plantikow] (who was the first lead engineer of [[Neo4j]]'s [[Cypher (query language)|Cypher]] for [[Apache Spark]] project) and [https://www.linkedin.com/in/stephencannan Stephen Cannan] (Technical Corrigenda editor of SQL). They are also the editors of the initial early working drafts of the GQL specification.<ref name="GQL EWD v2.2">{{cite web|url=https://isotc.iso.org/livelink/livelink?func=ll&objId=20836584&objAction=Open|title=''GQL Early Working Draft v2.2''.|last1=Eds. Plantikow|first1=Stefan|last2=Cannan|first2=Stephen|date=October 2019|publisher=ISO|access-date=November 9, 2019}}</ref>
As originally motivated,<ref name="Towards NWIP"/> the GQL project aims to complement the work of creating an implementable normative natural-language specification with supportive community efforts that enable contributions from those who are unable or uninterested in taking part in the formal process of defining a JTC 1 International Standard.<ref name="community">{{cite web|url=https://www.gqlstandards.org/|title=''GQL Standard''|access-date=November 12, 2019}}</ref><ref name="GCU 3">{{cite web|url=https://www.gqlstandards.org/community-updates|title=''GQL Community Updates''|access-date=November 12, 2019}}</ref> In July 2019 the [[Linked Data Benchmark Council]] (LDBC) agreed to become the umbrella organization for the efforts of community technical working groups. The Existing Languages and the Property Graph Schema working groups formed in late 2018 and early 2019 respectively. A working group to define formal [[denotational semantics]] for GQL was proposed at the third GQL Community Update in October 2019.<ref name="FSWG">{{cite web|url=https://drive.google.com/open?id=15DAUAORu477FF-DooTH2ol0SZhx2ARtr|title=''Formal Semantics Working Group''|last=Libkin|first=Leonid|access-date=November 12, 2019}}</ref>
=== ISO/IEC JTC 1/SC 32 WG3 ===
Line 45 ⟶ 46:
=== ISO stages ===
{{srn}}
ISO stages by date<ref>{{cite web | url=https://www.iso.org/standard/76120.html | title=Iso/Iec 39075:2024 }}</ref>▼
{| class="wikitable static-row-numbers"
▲
# 2019-09-10 : 20.00 New project registered in TC/SC work programme▼
|-
# 2021-11-22 : 30.00 Committee draft (CD) registered▼
|-
# 2022-02-25 : 30.60 Close of comment period▼
# 2022-08-29 : 30.92 CD referred back to Working Group▼
|-
|-
# 2022-10-26 : 30.60 Close of comment period▼
|-
# 2023-03-24 : 40.00 DIS registered▼
# 2023-05-24 : 40.20 DIS ballot initiated: 12 weeks▼
|-
# 2023-08-17 : 40.60 Close of voting▼
# 2023-11-28 : 40.99 Full report circulated: DIS approved for registration as FDIS▼
|-
# 2023-12-11 : 50.00 Final text received or FDIS registered for formal approval▼
# 2024-01-26 : 50.20 Proof sent to secretariat or FDIS ballot initiated: 8 weeks▼
|-
# 2024-03-23 : 50.60 Close of voting. Proof returned by secretariat▼
| 2022-08-30 || 30.20 CD study initiated
# 2024-03-23 : 60.00 International Standard under publication▼
|-
# 2024-04-12 : 60.60 International Standard published▼
|-
| 2023-03-22 || 30.99 CD approved for registration as [[Draft International Standard|DIS]]
|-
|-
|-
|-
|-
|-
|-
|-
|-
|}
== GQL property graph data model ==
GQL is a query language specifically for property graphs. A property graph closely resembles a [[conceptual data model]], as expressed in an [[entity–relationship model]] or in a [[Unified Modeling Language|UML]] [[class diagram]] (although it does not include n-ary relationships linking more than two entities). Entities are modelled as nodes, and relationships as edges, in a graph. Property graphs are ''multigraphs'': there can be many edges between the same pair of nodes. GQL graphs can be ''mixed'': they can contain directed edges, where one of the endpoint nodes of an edge is the tail (or source) and the other node is the head (or target or destination), but they can also contain undirected (bidirectional or reflexive) edges.
Nodes and edges, collectively known as elements, have attributes. Those attributes may be data values, or labels (tags). Values of properties cannot be elements of graphs, nor can they be whole graphs: these restrictions intentionally force a clean separation between the topology of a graph, and the attributes carrying data values in the context of a graph topology. The property graph data model therefore deliberately prevents nesting of graphs, or treating nodes in one graph as edges in another. Each property graph may have a set of labels and a set of properties that are associated with the graph as a whole.
Line 79 ⟶ 102:
== Implementations ==
==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<ref name="GQLs history">{{cite web|url=https://s3.amazonaws.com/artifacts.opencypher.org/website/materials/DM32.2/DM32.2-2018-00085R1-recent_history_of_property_graph_query_languages.pdf|title=''An overview of the recent history of Graph Query Languages''|last=Lindaaker|first=Tobias|date=May 2018|publisher=opencypher.org|access-date=October 6, 2019}}</ref> and comparative content of some of these inputs<ref name="Summary Chart">{{cite web|url=https://s3.amazonaws.com/artifacts.opencypher.org/website/materials/DM32.2/DM32.2-2018-00086r1-summary-chart-of-cypher-pgql-gcore.pdf|title=''Summary Chart of Cypher, PGQL, and G-Core''|last=Plantikow|first=Stefan|date=May 2018|publisher=opencypher.org|access-date=November 3, 2019}}</ref> were presented. GQL
|last=Angles|first=Renzo|journal=ACM Computing Surveys
|display-authors=etal|date=September 2017|volume=50
Line 90 ⟶ 113:
|arxiv=1610.06264
|s2cid=13526884
|access-date=November 12, 2019}}</ref> However, GQL is envisaged as a specific case of a more general class of graph languages, which
=== SQL/PGQ Property Graph Query ===
Line 142 ⟶ 165:
=== GSQL ===
GSQL<ref name="GSQL white paper">{{cite web|url=https://info.tigergraph.com/gsql|title=''GSQL: An SQL-Inspired Graph Query Language''|last1=Wu|first1=Mingxi|last2=Deutsch|first2=Alin|access-date=November 9, 2019}}</ref> is a language designed for [[TigerGraph]] Inc.'s proprietary graph database. Since October 2018 TigerGraph language designers have been promoting and working on the GQL project. GSQL is a [[Turing-complete language]] that incorporates procedural flow control and iteration, and a facility for gathering and modifying computed values associated with a program execution for the whole graph or for elements of a graph called accumulators. These features are designed to enable iterative graph computations to be combined with data exploration and retrieval. GSQL graphs must be described by a schema of vertexes and edges, which constrains all insertions and updates. This schema therefore has the closed world property of an SQL schema, and this aspect of GSQL (also reflected in design proposals deriving from the Morpheus project<ref name="PGS">{{cite web|url=https://s3.amazonaws.com/artifacts.opencypher.org/website/materials/sql-pg-2018-0056r1-Property-Graph-Schema.pdf|title=''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|last1=Voigt|first1=Hannes|last2=Selmer|first2=Petra|last3=Lindaaker|first3=Tobias|last4=Plantikow|first4=Stefan|last5=Green|first5=Alastair|last6=Furniss|first6=Peter|date=December 2018|publisher=openCypher.org|access-date=November 12, 2019}}</ref>) is proposed as an important optional feature of
Vertexes and edges are named schema objects which contain data but also define an imputed type, much as [[SQL
GSQL also supports the concept of Multigraphs
|