Replies: 3 comments 1 reply
-
I want to second this idea. The Graph Query Language (GQL) Standard looks like it will be published as an ISO standard either later this year or early next year at the latest. It would be really great if SurrealDB used GQL for all graph database features, or at least as much as possible. SurrealDB's graph queries are nice, but they can get confusing due to the fact that there is no differentiation between nodes and edges in a query and the data that are returned are not explicit. Take the example from the RELATE statement docs: "Based on all the products Tobie purchased, which person also purchased those products and what did they purchase?" SurrealDB's query looks like this:
There is no way to tell what a node is and what a relationship is in that query and I'm not sure what data are being returned. I don't know what the final version of GQL will look like, but supposedly it will borrow heavily from Neo4j's Cypher query language. I haven't used Cypher in a long time, but the same query in Cypher would look something this:
That Cypher query might not be totally accurate, but the point is that Cypher's syntax makes for very clear queries. I think if SurrealDB used the GQL standard for all graph database features, then it would make SurrealDB the ultimate database! |
Beta Was this translation helpful? Give feedback.
-
GQL is going to be published in Q2 2024. I'd like to bump this discussion |
Beta Was this translation helpful? Give feedback.
-
I agree that it is important for SurrealDB to support the official Graph Query Language standard. Here's a restrosepction from the (now-gone) founder of DGraph about mistakes he made. Some of it is self-serving, but there's good insights about how using an almost-GraphQL syntax - which wasn't GraphQL nor Neo4J's Cypher - was a major mistake. And surely it is even more of an issue now that there's an official standard. https://manishrjain.com/dgraph-labs-learnings (there's also good thoughts about building too much, as well as not doing enough to educate on the benefits and use-cases of Graph dbs, and how developers can migrate to using them. Surreal seems to be doing too much, as well as reinventing many well-defined and popular wheels) |
Beta Was this translation helpful? Give feedback.
-
NOTE
As of now, these standards are not well defined. This discussion is about not so near future
Topic
It would be a great developer experience if one could use opencypher (subset of the Neo4j cypher langauge) / GQL (Graph Query Language, not GraphQL). That would allow fluent transition from graph databases like neo4j/agensgraph/apache age.
Needs
Some features may be needed to achieve this
Beta Was this translation helpful? Give feedback.
All reactions