4

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?

cdeszaq
  • 322

1 Answers1

4

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.

Oded
  • 53,734