Now also copy data into the history tables. Of storage (history tables taking storage space) and in terms of impact to response time as updates and deletes Into say ElasticSearch and creating appropriate queries to return as of and version type data).Ī downside to relative to using Change log is that it does introduce extra costs to the database in terms This is also possible with Change log but requires more work (loading the change log With it is easy to query and view the data "As of" a given timestamp and view the versions and historicĬhanges for a given bean/row. Although Ebean makes itĮasier to query and generate the appropriate DDL the capturing of changes is a database function and not strictly Is used to update the database all these changes are captured by the database triggers. If other frameworks (not Ebean) or stored procedures or raw JDBC With changes are transactional and have the associated guarantees - changes can't be missed or lost. Postgres extension - arkhipov/temporal_tables.clarkdave blog post - historical-records-with-postgresql.Potentially updates to the associated triggers Schema changes to the "base table" (add column etc) result in mirrored changes to the "history table" and.Triggers are used on update and delete to copy the existing row data from the "base table" to the associated.A view is used to union all combine the "base table" and the "history table" to simplify history queries.Postgres has a timestamp range type so that is preferred to 2 separate columns for the Postgres implementation. 2 extra columns added to the base table and history table for "effective start" and "effective end" timestamp range.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |