Content deleted Content added
SQL/PGQ relationship to GQL |
Fix binding variable, Gremlin ref |
||
Line 14:
==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|website=|publisher=opencypher.org|accessdate=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|website=|publisher=opencypher.org|accessdate=November 3, 2019}}</ref> were presented. GQL will be 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
=== SQL/PGQ Property Graph Query ===
Line 24:
Cypher allows creation, reading, updating and deleting of graph elements, and is a language that can therefore be used for analytics engines and transactional databases.
Cypher uses compact fixed- and variable-length patterns which combine node and relationship (edge) topology representations with label existence and property value predicates. 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
For example, a pattern {{code|MATCH (p:Person}-[LIVES_IN]->(c:City)}} will generate a two-column output table. The first column named {{code|p}} will contain references to nodes with a label {{code|Person}} .
The binding variables {{code|p}} and {{code|c}} can then be dereferenced to obtain access to property values associated with the
<pre>MATCH (p:Person}-[LIVES_IN]->(c:City)
|