GQL, the new ISO standard for querying graph databases

The International Organization for Standardization (ISO) has published an international standard for querying graphs called Graph Query Language (ISO/IEC 39075:2024).

Translated from GQL: A New ISO Standard for Querying Graph Databases , author Joab Jackson.

Graph databases are now officially a first-class entity in computer science.

The International Organization for Standardization (ISO) has published an international standard for querying graphs, called Graph Query Language (ISO/IEC 39075:2024).

This is the first database query language released by ISO since its approval of SQL in 1987 . Standards bodies spent more than five years sorting out the details.

Philip Rathle , chief technology officer of Neo4j , said in an interview with TNS: "There is nothing like an international formal standard. It comes from the same organization as SQL and is a brother of SQL. It can promote the mainstream value of GQL."

Tony Holland , head of communications at ISO/IEC Joint Technical Committee 1/AG 1, said in a statement: "This release marks a new chapter in the history of query languages, revolutionizing how we interact with and harness the power of interconnected data. "GQL represents an important step forward in data query and manipulation, providing a unified and expressive language for navigating complex graph structures."

In addition to Neo4J's expertise, engineers from HypergraphDB , Redis Labs , TigerGraph , Oracle and the University of Bonn in Germany are also involved in the project .

Visualization of graph databases (provided by Neo4J)

Advantages of standardization

Approval of the language by a global standards body, just as it did for SQL itself, ensures its stability and encourages users and tool vendors to further invest in the technology.

The basis of graph computing is attribute graph , which is better at describing dynamically changing data.

Graph databases have been widely used for decades , and it is only recently that this form has generated renewed interest in becoming a key component of large-scale language models for generative AI applications . Graphical models can visualize complex, interconnected systems.

Rathle explains that the disadvantage of LLMs is that they are somewhat of a black box. "There's no way to understand the reasoning behind the language model. It just follows the neural network and does its own thing," he said. The knowledge graph can serve as an external memory, a way to visualize how the LLM constructs its worldview.

"So I can trace the graph and understand why it came up with that answer," Rathle said.

Graph databases are also widely used by health care companies for drug discovery, and by aircraft and other manufacturers as a way to visualize complex system designs, Rathle said. "You have all these cascading dependencies, and that calculation works very well in the graph," Rathle said.

The GQL standard is more than 600 pages long and cites more than 400 papers.

Components include:

  • Graph data types only (vertices, edges, paths)
  • Scalar data type
  • Operations, functions, and predicates of scalar types
  • transaction model
  • security model
  • graph pattern matching
  • Graph type, used to constrain the content of the graph

GQL is based on Cypher — and its open source variant OpenCypher — the query language for Neo4j , one of the most popular graph database systems .

The core syntax of GQL is basically the same as Cypher, and the MATCH ... RETURN statement works the same way. Inquire:

MATCH (movie:Movie)
RETURN movie.title

Will return all nodes in the database that have the label "Movie" .

Table 2. Result
movie.title
"Wall Street"
 
"The American President"
 
Rows: 2

GQL also uses the same basic expressions, linear combinations, and other aspects of Cypher.

For example, this sample query from Neo4J shows the next stops for a transport service that stops at Denmark Hill at 22:37:

MATCH (n:Station {name: 'Denmark Hill'})<-[:CALLS_AT]-
(s:Stop WHERE s.departs = time('22:37'))-[:NEXT]->
(:Stop)-[:CALLS_AT]->(d:Station)
RETURN d.name AS nextCallingPoint

The result is…

Table 4. Result
nextCallingPoint
"Clapham High Street"

However, there are some basic differences between Cypher and GQL .

GQL will use keywords INSERTto add nodes or relationships to the graph, while Cypher uses CREATE. FORstatement replaces Cypher's UNWIND.

Other graph query languages ​​include NebulaGraph ’s NQL, Apache Tinkerpop’s Gremlin , RDF’s SPARQL , and ArangoDB ’s AQL. There is also the GraphQL language , a graph-oriented query language for building APIs.

The upgrade path from existing graph query languages ​​should be fairly easy, at least if these implementations are based on Cypher. According to Rathlee, there are at least a dozen different graph database systems built on OpenCypher, including the popular Neptune from Amazon Web Services .

This article was first published on Yunyunzhongsheng ( https://yylives.cc/ ), everyone is welcome to visit.

The Google Python Foundation team was laid off. Google confirmed the layoffs, and the teams involved in Flutter, Dart and Python rushed to the GitHub hot list - How can open source programming languages ​​and frameworks be so cute? Xshell 8 opens beta test: supports RDP protocol and can remotely connect to Windows 10/11. When passengers connect to high-speed rail WiFi , the "35-year-old curse" of Chinese coders pops up when they connect to high-speed rail WiFi. MySQL's first long-term support version 8.4 GA AI search tool Perplexica : Completely open source and free, an open source alternative to Perplexity. Huawei executives evaluate the value of open source Hongmeng: It still has its own operating system despite continued suppression by foreign countries. German automotive software company Elektrobit open sourced an automotive operating system solution based on Ubuntu.
{{o.name}}
{{m.name}}

Guess you like

Origin my.oschina.net/u/6919515/blog/11066674