Graph Database A Gist - NEO4J

 Graph Database - The Comprehensive Landscape  


Graph Database as the name states, it's a database that uses various graph structures for storing & representing data. Its a NoSQL database which users graph theory to store, map and query the relationships. Since we say its a NoSQL all values are stored in (KV) pairs. Graph DB will handle more complex data and relationships, which are backed in at the data record level.

          When we say graph, we know its not going to be about tables, rows and columns. The graph DB uses nodes which will have  properties, labels etc. A record that is well known in a traditional DB is represented as an node. Every node will have values which is called properties.

For example 
 Any real world entity can be represented as a node. 
Let's take an example of a CAR

CAR is a node which contains the following properties

Name : Skoda 
Type  : Sedan 

A property can be a String, boolean, array, etc. We cannot have NULL as a property value, instead we can remove the property.

The nodes can be grouped by Labels. A Label can only be represented by String. it can't take up a numeric or alpha-numeric value.The Labels should Start with Camel-case and it can't properties tagged to them.

For example 

we have a Label Cars which will have following nodes
Name : Skoda              Name: Chev
Type : Sedan              Type : SUV

All the nodes are tagged to single Label Cars. A node can be connected to any number of labels or can also be left alone :). Similar to RDBMS graph DB can also have billions of records stored & grouped by labels.

No comments:

Post a Comment

 

Contributors

Social Connect


View Sadagopan K V's profile on LinkedIn