Hi,
For certain classes in our database we need to store a history of each changed field value.
We are considering two possible structures for this:
1. using a key-value index, with entries of the form
id.attribute_name.counter = { "field": "name", "old_value": "jon", "new_value": "john", "datetime_modified" : "some-date", "modified_by": "some-user" }
where id is the unique id of the record, and counter is just an incremented integer
2. using the graph structure, and having "delta" nodes connected to the main node, with a "modification" edge, and the same json object (+ the attribute name) stored in this node
The history info will sometimes be used to decide whether or not to update a record with new info
Would like to know pros/cons of both approaches
Kind Regards
Swami Kevala