Let’s say we want to build graph database, similar to relational database. Then we need language similar to SQL. SQL consists of several sections:
- data query language (DQL)
SELECT
and co:FROM
,WHERE
,GROUP BY
,ORDER
…
- data definition language (DDL aka schema)
CREATE
,DROP
,TRUNCATE
,ALTER
- data manipulation language (DML)
INSERT
,UPDATE
,DELETE
…
- data control language (DCL)
GRANT
,DENY
,REVOKE
- Transaction Control Language (TCL)
COMMIT
,ROLLBACK
…
Existing languages
See https://www.gqlstandards.org/existing-languages.
There are already a lot of proposals for graph query languages, most known are:
- SPARQL - RDF Query Language
- openCypher - open query language for property graph databases.
- Gremlin is a graph traversal language
- GraphQL
And less known languages:
- DQL based on GraphQL
- PGQL Property Graph Query Language
- GQL
- nGQL
- AQL
- PartiQL
- GSQL
- TypeQL
- EdgeQL
- WOQL a datalog variant
- GraphBLAS
Science papers
This is active research area, there are a lot of papers. See Graph query language papers.
DDL
aka metadata, types, data models, schemas
- https://www.edgedb.com/docs/datamodel/index
- https://typedb.com/docs/typedb/2.x/fundamentals/types
- https://graphql.org/learn/schema/
- Schema Validation and Evolution for Graph Databases
- https://opencypher.org/references/#pgm
- https://docs.tigergraph.com/gsql-ref/current/tutorials/gsql-101/define-a-schema
- https://docs.janusgraph.org/schema/
RDF “schemas”: