I'm having trouble understanding how exactly graph databases differ from relational databases, especially seeing as how graphs are isomorphic to relations. All the examples on this page look equivalent to how I'd model them in SQL: http://wiki.neo4j.org/content/Domain_Modeling_Gallery The best I gather is that graph databases are schemaless (big whoop, more room for error), and that their implementations tend to perf…
If you have stored a tree with adjacence (parent-child) relations, how would you retrieve all nested children? Or would you propose a different storage mechanism that keeps the property that reparenting entire subtrees is cheap? (All this in your RDBMS of choice.)
WITH RECURSIVE r AS (SELECT parent, child FROM tree UNION SELECT r.parent, tree.child FROM tree, r WHERE tree.parent = r.child) SELECT parent, child FROM r;
transforms this: (A,B), (B,C), (B,D)
into this: (A,B), (A,C), (A,D), (B,C), (B,D)