title: Ways to implement data versioning in Cassandra
body: <p>Can you share your thoughts how would you implement data versioning in Cassandra.</p>
  
  <p>Suppose that I need to version records in an simple address book. (Address book records are stored as Rows in a ColumnFamily). 
  I expect that the history:</p>
  
  <ul>
  <li>will be used infrequently</li>
  <li>will be used all at once to present it in a "time machine" fashion</li>
  <li>there won't be more versions than few hundred to a single record.</li>
  <li>history won't expire.</li>
  </ul>
  
  <p>I'm considering the following approach:</p>
  
  <ul>
  <li><p>Convert the address book to Super Column Family and store multiple version of address book records in one Row keyed (by time stamp) as super columns.</p></li>
  <li><p>Create new Super Column Family to store old records or changes to the records.
  Such structure would look as follows:</p>
  
  <p>{
   'address book row key': {
      'time stamp1': {
              'first name': 'new name',
              'modified by': 'user id',
          },</p>
  
  <pre><code>'time stamp2': {
          'first name': 'new name',
          'modified by': 'user id',
      },
  },
  </code></pre>
  
  <p>'another address book row key': {
      'time stamp': {
      ....</p></li>
  <li><p>Store versions as serialized (JSON) object attached in new ColumnFamilly. Representing  sets of version as rows and versions as columns. (modelled after <a href="http://blog.couchone.com/post/632718824/simple-document-versioning-with-couchdb" rel="noreferrer">Simple Document Versioning with CouchDB</a>)</p></li>
  </ul>