Hacker News new | ask | show | jobs
by eigenrick 4203 days ago
Ooh. Good question. In implementation, they end up looking a lot like key/value stores, since most of the ones I know are implemented as edge-vertex associations.

However, there is certainly a lot of specialized functionality on top of that. You can then turn around and apply both relational models and hierarchical models with them.

There are definitely some use cases for which I would heartily recommend a graph database over the others, so, yeah, it is another category. It is also something that should have been mentioned in this article. :)

2 comments

A simple key-value model is a very low-scalability, low-performance method of implementing a graph database. The key to graph database performance is maintaining consistent locality over traversals, which is no small trick from a computer science standpoint. I know a lot of graph databases work using naive key-value lookups but it is not recommended.

Most modestly scalable graph databases are implemented as traditional relational-style engines with highly optimized equi-join recursion. The most scalable implementations use topological methods that are beyond the scope of this post but definitely not simple key-value designs.

The "how your DB stores the data" and "how you query it" is kind of interesting. Time series DBs are similar to graph DBs — implementation-wise they're not really distinct, but the specialized functionality makes them extra useful.