Revisions: algorithm and data structure
- by SODA
Hi, I need ideas for structuring and processing data with revisions.
For example, I have a database of objects (e.g. cars). Each object has a number of properties, which can be arbitrary, so there's no a set schema to describe these objects. These objects are probably saved as key-value pairs.
Now I need to change property of an object. I don't want to completely rewrite it - I want to be able to go back and see history of changes to these properties, that's why I want to add new property and keep the old one (so I guess a timestamp would do the job of telling which property is the latest).
At the same time I want to be able to get info about any object in a snap, with only latest versions of each of the properties.
Any ideas what would be the best approach? At least please point me in the right direction. Thanks!