Tuesday, July 23, 2013

How to : Implement Document Versioning with Couchbase

Developers are often asking me how to "version" documents with Couchbase 2.0. The short answer is: the clients and server do not expose such feature, but it is quite easy to implement.

In this article I will use a basic approach, and you will be able to extend it depending of your business requirements.

The first thing to do is to select how to "store/organize" the versions of your document, and for this you have different designs:

  • copy the versions the document into new documents 
  • copy the versions of the document into a list of embedded documents 
  • store the list of attributes that have been changed into a embedded element (or new documents) 
  • store the "delta"
Read more here

Leave a Reply

All Tech News IN © 2011 DheTemplate.com & Main Blogger .