Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 64563 invoked from network); 6 Aug 2009 03:37:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 6 Aug 2009 03:37:46 -0000 Received: (qmail 50929 invoked by uid 500); 6 Aug 2009 03:37:53 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 50875 invoked by uid 500); 6 Aug 2009 03:37:53 -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 50865 invoked by uid 99); 6 Aug 2009 03:37:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Aug 2009 03:37:52 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jchris@gmail.com designates 209.85.212.193 as permitted sender) Received: from [209.85.212.193] (HELO mail-vw0-f193.google.com) (209.85.212.193) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Aug 2009 03:37:43 +0000 Received: by vws31 with SMTP id 31so582770vws.28 for ; Wed, 05 Aug 2009 20:37:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to :content-type:content-transfer-encoding; bh=Oew1E5hWa9BL5CpOkmeXUqc5fP9Oau7VhzUSMPtsB4M=; b=O9dA7im3wCbwvkcefzJQwnfd1zBnQtkqrFC9WzSjOHu2CAFu82PQH5D/0p2N22rfd3 A0IPssmXa92jDkeNv2Q6bgqcfpzBn/GawO0oKd3vY0DsRlnfAnapyaWur1ZSRtchQXA2 6z5tQa3m5f73Ca4Nf5kTYAF0zalySgLhjCb/w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=Ek+Ge0YWMmxeSiH9LRPR2+/DSVtySf2nCmkip9FfAPvzLsszIocuSdGKZ3RO13F5Dc HPhzfKIa1VypWYSWgWpjk16ZquheQz4RWx5ifeFwRZY6FFu/+X4ixvxCPshEH8i1jALT m1HGWlhmGBLguAthet09BOMdobIyz/Uapg7CI= MIME-Version: 1.0 Sender: jchris@gmail.com Received: by 10.220.87.8 with SMTP id u8mr9566368vcl.103.1249529842155; Wed, 05 Aug 2009 20:37:22 -0700 (PDT) In-Reply-To: References: Date: Wed, 5 Aug 2009 20:37:22 -0700 X-Google-Sender-Auth: df948d4f3b267d25 Message-ID: Subject: Re: stale document references From: Chris Anderson To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On Wed, Aug 5, 2009 at 7:40 PM, william cinnebar wrote: > Chris: thanks for the fast reply and thanks for the incredible amount of > work you are doing towards development of couchdb > > > to further clarify... > > Referential integrity falls to the method/function/processes of an > application that is using the data stored in a couchdb db file rather than > any inbuilt couchdb method/function/process. > > Normal/denormal is relevant to the structure of rdbms where sql would > typically be used to query the data. Essentially how 'self contained' a > document may be in couchdb is relative to specific use cases of > application/s that access the db file. > > ...normal/denormal has little if any actual relevance to document structures > or patterns of document management used within couchdb? You've mostly got it here. However, there is a strong relevance regarding document granularity. "Singleton" documents (like a master list of all employees and their projects in one document) are too denormalized, because the chances of 2 users editing them at the same time are too high. On the other hand, completely normalized would mean you'd have to load lots of documents to make any sensible screens in your application. So I tend to break up my documents around concurrent editing patterns. It's not a hard and fast rule but it has more pragmatic relevance in CouchDB's case. You certainly don't want N automated processes all attempting to change the same document multiple times a second. For that it's better to create a new document for each event and use a view to pull out or the total state. > > CouchApp is an abbreviated way of saying 'couchdb standalone application'. > > Any 'couchdb standalone application' is a CouchApp. > > My two cents says the core documentation for _ids and _revs is strong but > thanks for reiterating anyways... > > > cheers > -- Chris Anderson http://jchrisa.net http://couch.io