What are the pros and cons of Graph database?

 Posted by Niladri.Biswas on 12/12/2012 | Category: NoSql Interview questions | Views: 3898 | Points: 40
Answer:

Pros

a) Graph databases seem to be tailor-made for networking applications. The
prototypical example is a social network, where nodes represent users who have various kinds of relationships to each other. Modeling this kind of data using any of the other styles is often a tough fit, but a graph database would accept it with relish.

b) They are also perfect matches for an object-oriented system.

Cons

a) Because of the high degree of interconnectedness between nodes, graph
databases are generally not suitable for network partitioning.

b) Graph databases don’t scale out well.


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Posted by: Kevinsonra on: 6/19/2017 | Points: 10
The previous answers have already done a good job of summarising the advantages and disadvantages of graph databases.

I would add one more advantage. The model in a graph database is easier to change than in a relational database. If the type of relationship in an RDBMS changes e.g. from 1:N to M:N I need to use DDL to change the model, which may require downtime. I don’t have this problem in a graph database where changing the relationships/edges between vertices is much easier.

I would add two disadvantages of a graph database over a relational database:

Graph databases are poor at aggregating data. Don’t use it for Business Intelligence.

It is difficult to implement versioning/auditing of data in a graph database. While not impossible it is rather awkward though.

I have written up a blog post on the pros and cons of graph databases in comparison to RDBMS. It also discusses the various use cases of a graph database and the different types of storage implementation: https://sonra.io/2017/06/12/benefits-graph-databases-data-warehousing/

Login to post response