The database model changes history?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
4 views
You want to create a database model (or data warehouse), which would store not only the current state, as in conventional operational databases, but also the entire history of changes made to any attribute of any entity at the time to know everything in any time slice, as is done with aggregated data in data warehouses. But if the text attributes and aggregating of nothing, it is not clear how to build such a model. Something close to what I need, perhaps, temporal databases. I would like to know links to books, scientific articles, open-source projects on this subject.
by | 4 views

6 Answers

0 like 0 dislike
Well as for all data storage in storage, you can start by Slowly changing dimensions: the wikiaccordingly, any book on CD will contain the old theme and probably some of the types will do.
by
0 like 0 dislike
is not it easier to save changes in a separate database history?
by
0 like 0 dislike
I have worked on this subject, she was very popular in the nineties. But all sources are lost, unfortunately.
by
0 like 0 dislike
You can do the following at the very top of abstraction to make the data layer which will hide all the work with the versions. This way You will be able to work with the data using standard transactions without worrying about versions.
\r
Then we are left with only the essence (for simplicity let it be one and simple) and it may change. We can choose to keep a copy or only the changes and the queries to compute the desired state.
\r
In the first case, we need to retain copies of the entity and keep records of the versions, it is enough in the entity to determine such data and mark the last version as final.
\r
In the second case will need a mechanism to compute changes between versions, and actually apply them to the entity when requested.
\r
The easiest scenario. Take the last version of the entity And to change and save:
1) appeal to the service layer (knows nothing about the version) with the request to take the essence And
2) data layer queries the entity A and adds the query item of the last version
3) get the essence and gives the service that gives it to us
4) changing the essence and ask the service layer to save her
5) the data layer marks the new version as the last, and with the old this status is removed.
6) remain two entities, but for us it will look as one entity, because we operate with only a single entity.
by
0 like 0 dislike
CauchDB may be suitable. It just saves all changes to the data. To the previous values, you can apply version number.
by
0 like 0 dislike
text attributes just not a problem — the DVCS where they quickly and compactly stored diff-AMI.
With other much more complicated in terms of compactness — to have to keep entirely.
by
110,608 questions
257,186 answers
0 comments
25,350 users