Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 40CD3775D for ; Mon, 7 Nov 2011 13:26:25 +0000 (UTC) Received: (qmail 31046 invoked by uid 500); 7 Nov 2011 13:26:23 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 31003 invoked by uid 500); 7 Nov 2011 13:26:23 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 30995 invoked by uid 99); 7 Nov 2011 13:26:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Nov 2011 13:26:23 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of mrtrick@gmail.com designates 209.85.161.180 as permitted sender) Received: from [209.85.161.180] (HELO mail-gx0-f180.google.com) (209.85.161.180) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Nov 2011 13:26:14 +0000 Received: by ggnv5 with SMTP id v5so799923ggn.11 for ; Mon, 07 Nov 2011 05:25:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=YCHFge8AkQs+S/uiGfOAWtTR1Hg/fK4hoSyo0i3lboQ=; b=t2VwnwYRf6/gidhWkWqwnVqIftAx4B9jl2/VAMICbRUl06qL9Yr4OLh3LjeUlJutAZ aAMVzpKRd/vV6piDPyHSn2IkjCTTe1B7frSlOG+LpFZr26ege2EkLtWN4vaylJS9oiiR Pxmtv48mIiOxSxDIWEwb7rgaUkQM9tnWbwLho= Received: by 10.43.65.79 with SMTP id xl15mr47334982icb.6.1320672353415; Mon, 07 Nov 2011 05:25:53 -0800 (PST) Received: from [192.168.1.100] ([115.187.236.96]) by mx.google.com with ESMTPS id c3sm36405281pbt.12.2011.11.07.05.25.50 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 07 Nov 2011 05:25:51 -0800 (PST) Message-ID: <4EB7DC56.9000004@gmail.com> Date: Tue, 08 Nov 2011 00:25:42 +1100 From: Patrick Barnes User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: user@couchdb.apache.org Subject: Re: Best way to model historical data References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org 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. >