title: cassandra and historical data time wise
body: <p>We have a requirement where we have a relational database table T1 with 20 fields. We capture all changes/updated in this table happening on various fields (commit logs) and ingest/apply those in corresponding table CT1 in Cassandra, i.e. Cassandra table CT1 has exact same schema/fields as T1 (relational DB table).</p>
  
  <p>For Cassandra table CT1 we have additional requirement that we want to capture/store/retrieve all changed values of all fields meaning if Field f1 changed 20 times all its changed-values with the corresponding change-timestamp should be saved. Similarly, if Field f3 changed 100 times all its values should be saved. Note: different fields change at different times and each field changes the variable number of times, meaning one field may change 1000 times a day while some other field may never change at all.</p>
  
  <p>This is some kind of time-series data for each field. So I want to know how to represent such data model efficiently in Cassandra? Another requirement is I want to efficiently retrieve the most recent value of all fields in the table. </p>
  
  <p>For example:</p>
  
  <p>if f1 changed 10 times in a day, for f1 I want its most recent value to be returned. If f2 changed most recently a week back then for f2 that most recent value should be returned, so on for other fields.</p>