Skip to content
This repository has been archived by the owner on Nov 3, 2018. It is now read-only.

About Temporal Versioning

Matt Johnson edited this page Jun 5, 2013 · 2 revisions

Temporal What???

If you have ever had a requirement or specification that includes the words "As Of", or "Effective" - then you have encountered a temporal effectivity concern.

Some examples:

  • Give an employee a raise effective next week.
  • Change a person's name as of their wedding date.
  • Use a different financial formula starting next month, or retroactively from last quarter.
  • Put a product on sale as of tomorrow, and put it back at the regular price effective next week.

This is quite different than just keeping track of what has changed. You must be able to use those changes at the appropriate times.

A relational database system might make use of history tables or use some advanced flavor of 6th normal form (6NF) to represent data like this. In a document database like RavenDB, we need a more robust way to handle these concerns. That is what the Temporal Versioning bundle accomplishes.

It's important to realize that temporal versioning is usually for providing a temporal context where none naturally exists in the data. For example, if you record a series of events that took place at a particular time, the timestamp of each event is already providing temporal context. It probably doesn't make sense to add another one with temporal versioning. If you wanted to track changes to those events, the regular RavenDB Versioning bundle may be more appropriate.