DeepBlueCLtd / tac_store

data store
Apache License 2.0
0 stars 1 forks source link

Strategy for versioning #5

Open IanMayo opened 5 years ago

IanMayo commented 5 years ago

Our database needs to handle measurements being edited/corrected, including maintaining previous versions.

More details in the Data Modification section of the requirements document.

innopus commented 5 years ago

can we discuss on this?

innopus commented 5 years ago

We can use liquibase to just maintain database schema changes. But if you want to record data changes as well along with audit log I suggest we create triggers.

IanMayo commented 5 years ago

Some thoughts captured here: https://docs.google.com/presentation/d/19gD4C4Etdqs5z7cB9t_WogO-q53FAKehAPNYXFm3Hvw/edit?usp=sharing

Need to think more about the Datafile renaming strategy - to check it works across multiple changes.

IanMayo commented 5 years ago

Problem

Slide 9 of the above presentation introduces the problem: we can't derive a new dataset if the change affects records from two different datasets.

IanMayo commented 5 years ago

Read interesting article on change logging here: https://ludwigstuyck.wordpress.com/2013/04/04/history-tracking/

Ian's plan was Live History Logging, Bhasker's plan was A separate history table for each table being audited

In order to clearly highlight what changed, Ian likes A consolidated history table for all tables being audited

This brings these benefits:

Down-sides:

Frequently in this context, bulk records are manipulated at once. They may not all be set to the same value, but the same operation is applied to them all. So, whatever the logging strategy, it would benefit from having a "Changes" table. This contains a textual description of the change, when it was performed, and who performed it. Each entry in the logging file (consolidated or separate history) would link to an entry here (FK).

innopus commented 5 years ago

Lets discuss on that article Ian. That is perfectly my comments on the different type of logs. Let us discuss on the user requirement and take a call which Audit log method would be a good idea for us.