3 ms·
The reason graph DBs exist is mainly to provide easier syntax for recursive queries (which aren't really recursive because they're tail-recursive, which means i
by cryptonector 4y ago
The reason graph DBs exist is mainly to provide easier syntax for recursive queries (which aren't really recursive because they're tail-recursive, which means iterative rather than what most people think of as recursive).
Any questions?
It's not clear how one might make SQL syntax for recursive queries simpler. Clearly we can have syntactic sugar for "dereferencing" relationships, so one could say `SELECT child-->name FROM parent_child WHERE ...;`, and we could have aggregation `SELECT array_agg(child-->name) FROM parent_child WHERE ...;`, and `SELECT child--->name FROM parent_child WHERE ...;` to say "recurse all the way through the child relation", but if you want more than one column then things get tricky.