Neo4J - Need for Graph Database



Simply, we can say that Graph Databases are mainly useful to store more connected data.

If we use RDBMS Databases to store more connected data, then they do not provide proper performance for traversing large amount of data. In these scenarios, Graph Database improves the application performance very well.

Nowadays, most of the Social Networking applications like Facebook, Google+, LinkedIn, Twitter, Yammer etc. and Video hosting applications like Google YouTube, Flickr, Yahoo Video etc. are using more connected data.

We will observe what is connected data? and how these applications are storing data with some Realtime applications.

Scenario 1: Google+

Take Google+ (GooglePlus) Application to understand the need of Graph Databases in the real world. Observe the diagram mentioned below.

Here, we have represented Google+ applications Profiles with circles.

Neo4j CQL Tutorial

In the above diagram, Profile "A" has Circles to connect to other profiles : Family Circle(B,C,D) and Friends Circle(X, Y).

Again if we open Profile "B", we can observe the following connected data

Neo4j CQL Tutorial

Like this, these applications contain lots of structured, semi-structured and unstructured connected data. It is not easy to represent this kind of unstructured connected data in RDBMS Databases.

If we store this kind of more connected data in RDBMS Databases then retrieval or traversal is very tough and slow.

So to represent or store this kind of more connected data, we should choose one of the popular Graph Databases.

Graph DBMS stores this kind of more connected data very easily. It stores each Profile data as a Node internally, it's connected Nodes with adjacent nodes and they connect each other with Relationships.

They store this kind of connected data same as we represent them in the above diagram so that retrieval or traversal is very easy and faster.

Scenario 2: Facebook

Take Facebook Application to understand the need of Graph Databases in the real world.

Neo4j CQL Tutorial

In the above diagram, Facebook Profile "A" has connected to his friends, likes some of his friends, sent messages to some of his friends, follows some of Celebrities he likes.

That means lots of connected data Profile A. If we open other profiles like Profile B, we will see similar kind of lots of connected data.

NOTE - By observing above two applications, they have lots of more connected data. It is very easy to store and retrieve, this kind of more connected data with Graph Databases.

Advertisements