2

Using a version control system for your source code (like subversion) makes sense because it allows you to back out of mistakes, audit changes, make painless snapshots, discover exactly where something went wrong so that you can improve your process etc. For the same reasons it makes sense to do change tracking of business data, and many systems do so.

There are already a few questions on how to implement this on top of a normal database:

For a feature that is so useful and popular, it seems strange that we all need to reinvent the wheel. Are there any existing database implementations which already solved this problem? I'm imagining that such a system would extend the SQL syntax to allow easy querying of the history.

Community
  • 1
  • 1
Wim Coenen
  • 63,995
  • 12
  • 149
  • 237

5 Answers5

6

Take a look at temporal databases, such as TimeDB.

Matthew Flaschen
  • 255,933
  • 45
  • 489
  • 528
2

Not a relational database (you didn't say it had to be), but CouchDB has versioning built-in.

Sasha Chedygov
  • 116,670
  • 26
  • 98
  • 110
1

The space requirements would be prohibitive, so this is why you typically roll your own.

There are different solutions, depending on your toolkit:

Robert Munteanu
  • 63,405
  • 31
  • 191
  • 270
0

As far as the data goes, I believe it's called "change data capture".

duffymo
  • 293,097
  • 41
  • 348
  • 541
-1

Given that most countries require that all accounting transactions are logged, pretty well every database lets you record the history for auditing.

Pete Kirkham
  • 46,814
  • 5
  • 86
  • 159