3 ms·
Hmm I'm not familiar with Datomic but in SQL you can always break tables apart as it makes sense. NULL values are fine too if you've already decided that is a
by jayd16 8y ago
Hmm I'm not familiar with Datomic but in SQL you can always break tables apart as it makes sense. NULL values are fine too if you've already decided that is a valid state in your schema but you can also use mapping tables instead of nullable columns.
>client only declare/specify/depend-on a partial schema that only lists the attributes it needs.
Can you describe what you mean here? It just sounds like specifying your selected columns to someone who is not familiar with the tool.
- fmjrey 8y agoDatomic uses datalog which can select any entity based on an expression about attributes, no need to say FROM table name or entity type. Basically entities have an id and can have any attribute. The official doc [1] gives the example of querying all movies by selecting all entities which have a `movie/title` attribute: `[:find ?e :where [?e :movie/title]]`. In that example the `movie` namespace really plays the role of a table name, or entity type, but as I said, namespaces can represent anything and entities can have any attributes, e.g. `[:find ?e :where [?e :audit/last-modified-by "user123"]]` would return any entity last modified by a given user. Note that this latter example is not really how you would capture last modified info in datomic, one would use transaction data [2] instead. Another example is master data management whereby attribute namespaces can refer to the different data sources, e.g. `accounting-system/id`, `supplier/id`, etc. [1] https://docs.datomic.com/on-prem/getting-started/query-the-data.html https://docs.datomic.com/on-prem/getting-started/query-the-d... [2] https://docs.datomic.com/on-prem/transactions.html#reified-transactions https://docs.datomic.com/on-prem/transactions.html#reified-t...