Re:Migration from Postgres to Datomic
by iaabtpbtpnn on Thursday July 06, 2017 @09:47PM
(#14715429)
Alternatively, you can automate this with triggers, where the client only needs to know about the entity table, but all updates to an entity cause the previous value to be inserted into another table entity_log. We do this and it works well for us.
[ Parent
| on HN ]
See also the Temporal Tables extension to PostgreSQL
https://github.com/arkhipov/temporal_tables
Re:Migration from Postgres to Datomic
by ComodoHacker on Friday July 07, 2017 @01:44AM
(#14716346)
The whole point of storing history is ability for clients to explicitly query it (and sometimes manipulate it), isn't it?
You can query a history table.
Re:Migration from Postgres to Datomic
by ComodoHacker on Friday July 07, 2017 @02:36AM
(#14716538)
Not if "client only needs to know about the entity table"
So If you need to give history access to your client I guess you can put up a "entity_history" function that will generate a snapshot entity table from his request and the log table.
It all depend on your need, RDMS schema are customely build to meet customers needs, I don't believe in proverbial Swiss knife tool anymore.