Hacker News new | ask | show | jobs
by TeMPOraL 2203 days ago
I'd say it's more about query language, and what types of queries the DB is optimized for. Graph DBs come with query languages that let you directly ask questions like "starting from node $foo, select all nodes and edges that lead to node $bar, but only for paths consisting of edges with property $xyz > 42".

An example from Neo4J documentation:

  MATCH p =(charlie:Person)-[* { blocked:false }]-(martin:Person)
  WHERE charlie.name = 'Charlie Sheen' AND martin.name = 'Martin Sheen'
  RETURN p
which, per documentation, "returns the paths between 'Charlie Sheen' and 'Martin Sheen' where all relationships have the blocked property set to false".

https://neo4j.com/docs/cypher-manual/current/clauses/match/#...

Graph DBs are designed for modelling your data as nodes with properties, connecting by directed edges, with properties, to another nodes; they're also internally optimized for doing such queries.