Where previously there was only relational databases, the data store world is now rife with options like Key-Value, Document, and Graph datastores. Unfortunately, every datastore likes to show how it can be used for anything, but none of them really help people figure out when to use one model over another.

So, the question is: What "things" are graph datastores better at than relational datastores? (ie. faster, simpler, more flexible, more powerful) What makes them better at doing those things?


Highly connected graphs are not easy to model or query using relational databases.

Think about social graphs - Bob is a friend to Alice, Alice is a friend to Carol.

How many friends of friends does Bob have?

Modelling and querying this kind of data is what graph datastores are good at.

Another example - think about Dr Who episodes and a corpus of data about all the actors, characters and sets used in them. In a graph datastore you could query all the episodes an actor was in a specific set with a specific character - this is not easy to model or query in relational database.

  • 1
    So, answering the the n-steps-away sorts of questions? Or, to put it another way, answering questions that rely on transitivity? – cdeszaq Feb 9 '12 at 16:08
  • @cdeszaq - Its about traversing and querying relationships between objects as well as the objects themselves. – Oded Feb 9 '12 at 16:09
  • With the edit: Also multi-relational data? Commonly called ternary relationships, where you need to connect n different entities so a RDBMS "associative table" gets unwieldy as the number of entities to connect gets larger? – cdeszaq Feb 9 '12 at 16:10
  • 1
    @cdeszaq - Definitely multi-relational data. – Oded Feb 9 '12 at 16:12
  • @cdeszaq - Check out neo4j.org – Oded Feb 9 '12 at 16:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.