|
In RMDB, database data model (db,table, row, col, value[array,json, int, text, etc.] ) is hierarchical. Relation is a logical model mapping of data structures, it is just a logical thinking that exists in the brain. SQL, Prolog, clojure.core, minikanren can be used for relational operations. |
It's true that we can represent relations using collections. In Clojure we'd write:
But these structures don't allow for efficient lookup or joins, and we lack inbuilt functions to easily deal with data modelled in this way.Relational databases are based on relational algebra. If Clojure is based on relational databases, then we'd expect to be able to do relational algebra easily in Clojure. But we can't: the core library isn't designed for it, and the built-in data structures aren't designed for it.