O'Reilly logo

RavenDB High Performance by Brian Ritchie

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Handling changing data over time

So far, we have discussed documents that represent the current value of our data. But in many cases, data changes over time. How do we know what the previous state of the data was before it was updated? In relational databases, we often create history tables to store these old versions. Fortunately, RavenDB has a much cleaner approach. It has a Versioning bundle that adds support for automatically storing snapshots of documents every time they are changed.

The Versioning bundle will copy the historical documents into a location relative to the document. For example, if we have a document called pages/1, then older versions would be stored at pages/1/revisions/1, pages/1/revisions/2, and so on. You can learn more ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required