The term “relational database” is kind of a joke. The name comes from the mathematical term relation, which is a set of tuples, or basically a table. So if you have an application consisting of people and movies, then the two relations are Person
and Movie
. But how are people are movies related to each other? Those are not the relations that the relational model refers to as relations.
When normal people think of relations, they think of relationships between, among other things:
Writing applications in these domains using relational databases can be done, but you have to fight the model.
But managing richly connected data in a graph database is natural. Graph databases are the real “relational” databases.
There are at least two scenarios in which the relational (ahem, tabular-with-foreign-key) model of data is painful: non-uniform data and relationship chains.
The real world is:
Relational databases assume the opposite.
TODO: EXAMPLE WITH NULLS IN A COLUMN
TODO: EXAMPLE WITH LOTS OF NULLS (SINGLE TABLE INHERITANCE)
TODO: EXAMPLE WITH RECOMMENDATIONS: CUSTOMERS WHO BOUGHT THIS ALSO BOUGHT THAT... Tables: Customer, Order, Line Item, Product
TODO: EXAMPLE WITH CHAINS WITHIN THE SAME TABLE, PERHAPS TWEETS WITH PREDECESSORS