incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Barnes <mrtr...@gmail.com>
Subject Re: Best way to model historical data
Date Mon, 07 Nov 2011 13:25:42 GMT
Hi Andres,

For your historical data; do you need to run all the same levels of 
queries on it? Or would you be more likely to only need the historical 
data so that you can undo changes?

For the latter case, consider if storing a copy of the previous versions 
of a document as a json attachment could work well for you. You could 
still access those earlier versions through the current document, but it 
would not end up appearing in your views. If you need to revert to an 
older version of the document, store the current version and load the 
older version into the document.

Regards,
-Patrick

On 2/11/2011 9:20 PM, couchdb - Andrés Orencio - lodopidolo wrote:
> Hello. I'm new in couchdb.
>
> I have some questions but I'm going to put them in separate threads.
>
> For this, I want ask you which is the better way to store documents and its
> historical states.
>
> For example, I have products documents and categories documents. Products
> has one or more categories. This "relation" may change in the time, and
> product characteristics can change to.
>
> I want to store all document changes (categories too).
>
> Which is the better way to do this?
>
> Thanks you.
>

Mime
View raw message