What is Graph Databases?
This is last item is NoSQL Categories Breakdown series, in this article I will explain about Graph Databases which is one of the subcategory in NoSQL databases. Specialty of Graph Databases is they work really great for tracking relationships and that’s why this category is great fit for social network applications or just about anything where relationships are playing really important roles. And relationships can be thought of in an expansive way because you know how relationships costs in RDBMS. In Graph Database one relationship is about ownership or control and with we can pretty much represent just any data from that database.
Graph Databases have little different terminology as compare to other NoSQL databases which is interested, Nodes and Edges. Edges are kind of joins between the rows in a table and Nodes like a row is a table can also have properties and values. So once again the whole concept of Key-Value pairs getting represented in again and again in different format isn’t it?
Now a day’s popular graph database is Neo4j. Below are some graph database logos for your reference.
Here is illustrative diagram, which will help you to understand how Graph Database work.
I haven’t specified a bunch of properties and values here but it’s ok because part of what we want to portray is just that we can track relationships between the objects/things. Now in this case I’m specifying that Clark has an address relationship with the address node having Address1, City, State and Zip as properties and respected values. Has also friend relationship with Sam. And here is one of the best social networking scenario, may be Sam & Alex commented on a photo posted by Anna. Alex created Birthday event and invited to Clark.
If you notice some of the ovals have lots of properties and values, some of them don’t have any but because they have edges that points to other objects that do have properties and values which is still quite map reasonable.
When you open your Facebook and you see the list of people who are not on your friend’s list but they are your friends of friends (or even deeper) or the people with something in common. Based on this we can extract someone you might know, or could be interested in knowing. This is best example of Graph Database functionality.
I hope you understand this Graph Databases and this is end of NoSQL Categories Breakdown series.
Thanks for visiting and reading this series of NoSQL Databases.
Sandip