Hacker News new | ask | show | jobs
by david_p 759 days ago
I love the idea of a simplified SQL syntax for joins.

I have been working with graph databases for years now: these databases had to solve this problem from day one, because of the focus on relationships between entities.

I must point out that Neo4j was the first to propose a syntax that made traversal feel simple and natural again: the Cypher query language.

Neo4 and other industry players have spent years working on a new standard query language for graph databases that was released in April this year: GQL. GQL is the first database query language normalized by ISO since SQL, so it’s a big deal.

Anyway, if you wanna learn more about GQL, that a look at https://www.gqlstandards.org/

4 comments

Graph databases aren't particularly relevant to a novel syntax for relational databases. The part of the related standard that is about relational databases (SQL/PGQ) demands that every table hold either edges or vertices, but not both [1], which is very limiting.

[1] https://peter.eisentraut.org/blog/2023/04/04/sql-2023-is-fin...

I struggled to find the actual language at the link you posted - is there an obvious example somewhere?

Given that graphql is often shortened to gql is feel this is going to get confusing!

This paper [1] explains some basics

[1] https://arxiv.org/abs/2112.06217

I think InterSystems Caché did it first. Its SQL join syntax lets you do `WHERE employee->manager->manager->name`. I'm not sure it has arbitrary recursion like you can do with graph databases, however.
> I must point out that Neo4j was the first to propose a syntax that made traversal feel simple and natural again

Was it the first? Does it predate path expressions in Hibernate Query Language / Java Persistence Query Language?