Content deleted Content added
m →GSQL |
→ISO stages: wikitable |
||
(7 intermediate revisions by 7 users not shown) | |||
Line 3:
{{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
==== Official ISO standard ====
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▼
| 2021-11-23 || 30.20 CD study initiated
# 2023-03-22 : 30.99 CD approved for registration as [[Draft International Standard|DIS]]▼
|-
# 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▼
|-
|-
|-
|-
|-
|-
|-
|-
|-
|-
|}
== 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 82 ⟶ 105:
==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 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 (query language)|Gremlin]]<ref name="Gremlin 2015">{{cite book|url=https://dl.acm.org/citation.cfm?id=2815073|title= Proceedings of the 15th Symposium on Database Programming Languages|last=Rodriguez|first=Marko A.|chapter= The Gremlin graph traversal machine and language (Invited talk)|date=2015|pages= 1–10|publisher=ACM|doi=10.1145/2815072.2815073|arxiv= 1508.03843|isbn=9781450339025|s2cid=32623848|access-date=November 10, 2019}}</ref>), and GSQL,<ref name="GSQL white paper"/> making it possible to traverse a graph iteratively to perform a class of graph algorithms, but GQL will not directly incorporate such features.<ref name="Wood Graph Query">{{cite journal|url=https://dl.acm.org/ft_gateway.cfm?id=2206879&ftid=1212198&dwn=1&CFID=106456621&CFTOKEN=92daacebb1744396-220C1ECA-F98C-4552-03541423FDE04D18|title= Query languages for graph databases|last=Wood|first=Peter T.|journal=ACM SIGMOD Record|date=25 April 2012|volume=41|issue=1|pages=50–60|publisher=ACM|doi=10.1145/2206869.2206879|s2cid=13537601|access-date=October 25, 2019|url-access=subscription}}</ref><ref name="GQL foundations">{{cite journal|url=https://dl.acm.org/citation.cfm?id=3104031|title= Foundations of Modern Query Languages for Graph Databases
|last=Angles|first=Renzo|journal=ACM Computing Surveys
|display-authors=etal|date=September 2017|volume=50
Line 144 ⟶ 167:
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 GSQL.
Vertexes and edges are named schema objects which contain data but also define an imputed type, much as [[SQL table]]s are data containers, with an associated implicit row type. GSQL graphs are then composed from these vertex and edge sets, and multiple named graphs can include the same vertex or edge set. GSQL has developed new features since its release in September 2017,<ref name="GSQL 1.0">{{cite web|url=https://doc-archive.tigergraph.com/1.0/GSQL-Language-Reference-Part-1---Defining-Graphs-and-Loading-Data.html|title=''GSQL documentation Tigergraph 1.0''.|date=2017|access-date=November 9, 2019}}</ref> most notably introducing variable-length edge pattern matching<ref name="GSQL patterns">{{cite web|url=https://docs.tigergraph.com/v/2.4/release-notes-change-log/release-notes-tigergraph-2.4|title=''Pattern Matching'', TigerGraph 2.4 Release Notes.|date=June 2019|access-date=November 9, 2019}}</ref> using a syntax related to that seen in Cypher, PGQL and SQL/PGQ, but also close in style to the fixed-length patterns offered by [[Microsoft SQL/Server Graph]]<ref name="SQLServer Graph">{{cite web|url=https://docs.microsoft.com/en-us/sql/relational-databases/graphs/sql-graph-overview?view=sql-server-ver15#query-language-extensions|title=''Query language extensions'', Graph processing with SQL Server and Azure SQL Database|display-authors=etal|date=2017|publisher=Microsoft Inc.|access-date=November 10, 2019}}</ref>
GSQL also supports the concept of Multigraphs
|