I've always been curious about graph DBs and dabbled a bit in them, but for those who have more extensive experience in them-- are they really worth it? Is it that for small scale SQL is better and graph DBs really only matter at scale, or for specific use cases with highly connected data?
I'm a bit of a Forensic Files nerd, so I worked on a little side project a while back to pull the transcripts from several episodes, use entity recognition to categorize people, places, things, etc, and load them into a Neo4j database (via Cypher queries). It turns out there's something called the POLE data model[1] that can be used by law enforcement to help solve crimes. You load all the details into a graph database and evaluate the relationships to aid in solving crimes. I suppose you could argue a criminal investigation is essentially graph traversal.
[1] https://neo4j.com/blog/government/graph-technology-pole-posi...
Edit: typo
I played around with Neo4j and only ever found two domains where it excelled.
- custom app security
- social media
I also think cypher is a brilliant way to query a graph.
I worked for the research branch of a children's hospital. At one point, I was brought into vendor evaluations a department wanted to buy. Their tool had something to do with visualizing protein interactions, which was highly networked. It was basically a Neo4j database with a React UI on top of it.
I worked in a startup whose value proposition was largely derived from using graph data and graph databases under the hood. The main benefit is, as the repo even states "Fast data processing: Links traversal is processed with O(1) complexity."
So, technically, you can do deep traversals quicker. A few notes:
1. Few use cases truly need low-latency deep traversal on realtime data (>5 hops). There are some well known ones like fraud detection in payment processing and, possibly, social media recommendation engines. But I am not even sure how latest social media engines work, and whether they still rely on graph DBs.
2. However, in practice the advantage is often marginal. With modern analytical databases, or even an optimized PostgreSQL (ltree, materialized views, pgrouting, pg_duckdb, etc), you often get more than good enough performance. In addition those traditional SQL DBs scale with hardware more easily than graph databases. So, you can always use the lever: "Throw more hardware at it."
3. Even Graph DBs don't get good traversal performance under all conditions without hand tuning. For example, there is the "super node" issue, a node with an abnormally high number of connections (edges). And if you still need hand-tuning, you might as well choose something more versatile.
4. The ecosystem of a PostgreSQL and other popular DBs is just unbeaten. With graph DBs, you often prematurely put yourself in a corner that you don't want to be in.
Hence, my recommendation. Unless you are really sure that a graph DB is the right fit for your use case, start with something else, and go the graph db way when you have established a true need.