Hi,
I've been recently exposed to some informational systems where all the domain data was modeled as one graph instead of a set of inter-related tables.
I worked with RDBs (primarily Postgres) for 5+ years and I cannot say that it ever felt wrong, but the more I think about modeling data as graphs, the more it makes me confused why it's not the default way.
Graphs seemed to be:
(1) Easier to scale (both storage-wise and complexity-wise).
(2) Closer to how we model the world in our minds, hence easier to reason about.
(3) Easier to query (felt more like GraphQL than SQL if it makes any sense).
The way I see it, there are two major ways to connect singular entities in a data model:
1. Lists (aka tables) that allow you to sort, filter, and aggregate within a set of entities of the same kind.
2. Relations (aka graph edges or foreign keys) to connect singular entities of different kinds.
... And I can imagine relational DBs being List-first Relation-second, and graph DBs being the opposite. But maybe that's too much of a simplification.
Anyway, looking back at different domains I worked with, it felt like I had spent much more time working with relations than with lists.
Another signal: I have an intern developer, and it took him 1 minute to understand the basics of how graphs work, but then I spent two hours explaining why we needed extra tables for many-to-many relations and how they worked.
Any thoughts? What am I missing? Are RDBs the default way mostly due to historical reasons?
Discussion on this topic that I could find: https://news.ycombinator.com/item?id=27541453
Network databases, which seem quite similar to graph databases, were standardized (https://en.wikipedia.org/wiki/CODASYL).
Both the hierarchical and network models had low-level query languages, in which you were navigating through the hierarchical or network structures.
Then the relational model was proposed in 1970, in Codd's famous paper. The genius of it was in proposing a mathematical model that was conceptually simple, conceivably practical, and it supported a high-level querying approach. (Actually two of them, relational algebra and relational calculus.) He left the little matter of implementation as an exercise to the reader, and so began many years of research into data structures and algorithms, query processing, query optimization, and transaction processing, to make the whole thing practical. And when these systems started showing practical promise (early 80s?), the network model withered away quickly.
Ignoring the fact that relational databases and SQL are permanently entrenched, an alternative database technology cannot succeed unless it also supports a high-level query language. The advantages of such a language are just overwhelming.
But another factor is that all of the hard database research and implementation problems have been solved in the context of relational database systems. You want to spring your new database technology on the world, because of its unique secret sauce? It isn't going anywhere until it has a high-level query language (including SQL support), query optimization, internationalization, ACID transactions, blob types, backup and recovery, replication, integration with all the major programming languages, scales with memory and CPUs, ...
(Source: cofounder of two startups creating databases with secret sauces.)