Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 33184 invoked from network); 5 Jan 2010 18:02:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 5 Jan 2010 18:02:04 -0000 Received: (qmail 93043 invoked by uid 500); 5 Jan 2010 18:02:03 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 92970 invoked by uid 500); 5 Jan 2010 18:02:02 -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 92960 invoked by uid 99); 5 Jan 2010 18:02:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Jan 2010 18:02:02 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gcdcu-couchdb-user@m.gmane.org designates 80.91.229.12 as permitted sender) Received: from [80.91.229.12] (HELO lo.gmane.org) (80.91.229.12) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Jan 2010 18:01:54 +0000 Received: from list by lo.gmane.org with local (Exim 4.50) id 1NSDij-0006VF-VU for user@couchdb.apache.org; Tue, 05 Jan 2010 19:01:29 +0100 Received: from e180011236.adsl.alicedsl.de ([85.180.11.236]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 05 Jan 2010 19:01:29 +0100 Received: from joscha by e180011236.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 05 Jan 2010 19:01:29 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: user@couchdb.apache.org From: Joscha Feth Subject: Re: Modeling question Date: Tue, 05 Jan 2010 19:01:06 +0100 Lines: 32 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: e180011236.adsl.alicedsl.de User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0 In-Reply-To: Sender: news On 05.01.10 18:49, Chris Anderson wrote: > if you collate correctly and use startkey and endkey you will be be > able to read just the relevant rows from the view. This should be > practically instantaneous, so it's probably the right solution. Actually this is only true for A's (I do this already), as any B or C does not necessarily have its own access field. As it is not possible to temporary store variables in a map function, there is no way I can distribute the acl from a parent element (such as A or B) into a child element (B or C). I could misuse reduce probably, but as this is discouraged, I did not even try. Also an A does not have any information about its children, so when emitting an A (which will most likely contain the access information), I can not also emit that information for any child (B or C). This makes using starkey and endkey only suitable for A's but not for any child element in the hierarchy. Any other ideas? > I mentioned before, but I'll mention again - if there's a way to > achieve your business case without modeling a hierarchy (always an > impedance mismatch with key value stores) you will simplify a lot of > things. Not that it's impossible to do a hierarchy, but if you can get > away without it, you'll have a lot less on your plate. I've read that multiple times, but you know there are these times when a hierarchy just is needed. regards, Joscha