top | item 19729701

(no title)

cgrand-net | 6 years ago

No, it's hierarchical (because we nest collection types) vs relational.

discuss

order

lincpa|6 years ago

In RMDB(For example postgresql), Database is hierarchical nest collection types. It is also consistent with Clojure.

```clojure

{:table01 {:row01 {:col-array [0 1 2]

                   :col-json  "{\"a\": \"Hello\"}"

                   :col-text  "abc"}

           :row02 {}}
 
  :table02 {:row01 {}

            :row02 {}}}
```

In addition, postgresql supports inheritance, which is also hierarchical nest collection types.

weavejester|6 years ago

While Postgres supports hierarchical data in the form of JSON, that doesn't mean it's a form of relational data, it just means Postgres supports both.

Clojure doesn't have good tools in its core library for working with relational data. There's no core type that explicitly represents a relation, and Clojure lacks functions for many basic relational algebra operations. For example, how would you perform a natural join across your data structure?