A Brief Understanding of Graph DB
Well, an idea can just be a shifting of a thought process, the perspective of how we are seeing things. Previously in relational databases, we stored data as independent set of data having very complex links between them. To find relation between the data we needed to use expensive Joins during queries.
“Realize that everything connects to everything else”
— Leonardo Da Vinci
Graph DB is revolutionary, cause now we can store data in a way where we give priority to the connections in data. So, the information is stored preferring the connections so later it can be retrieved efficiently. We can visualize all the stored data in a simple form and the connection between them.
Take any data, for example A school database, where school can be one entity, then students, teacher, subjects, standards. Now let’s represent these in a graph. Each of the entity you can think now can be represented as vertices then relationships between them can be added as edges.
So here, School(s), student(s), teacher(s) and standard(s) are those entities represented as vertices and how they are connected (for example, teacher 1 teaches student 1) are represented in edges. Each of the entity can grow vertically and each of them can be connected with any of the other node(s) directly.
We can add any number of properties in the vertices and as well as edges. Querying on top of this structure now can be visualized nicely. For example,
- All the students of a school: vertices outgoing from vertex of type : SCHOOL and edge type : has_student
- All the teachers assigned to a student: vertices incoming to vertex type: STUDENT with edge: teaches
ADVANTAGES
- AVAILABILITY: The schema changes can be managed in vertical as well as horizontal direction without changing the previous design.
- HIGH VOLUME: Huge volume of data can be managed with ease
- FAST: Query can be responded in real time as indexing of the properties are designed to be optimized.
- FUTURISTIC: Intelligent algorithmic approaches on top of the stored data can be activated easily.
POPULAR GRAPH DBs
- Neo4j
- ArangoGraph
- OrientDB
- AllegroGraph
- Ontotext GraphDB
- GraphBase
- Titan
- Graph Story
- Oracle Spatial and Graph
- Startdog
This article is not ended here, as it would give birth to so many questions. In the following, let’s address to those questions. Please let me know your query in the comment section or tweeting me directly. I would love to improve this article by your suggestions.