Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 4775 invoked from network); 9 Jul 2009 20:16:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Jul 2009 20:16:46 -0000 Received: (qmail 8419 invoked by uid 500); 9 Jul 2009 20:16:55 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 8368 invoked by uid 500); 9 Jul 2009 20:16:54 -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 8358 invoked by uid 99); 9 Jul 2009 20:16:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Jul 2009 20:16:54 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of gurdiga@gmail.com designates 209.85.218.225 as permitted sender) Received: from [209.85.218.225] (HELO mail-bw0-f225.google.com) (209.85.218.225) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Jul 2009 20:16:45 +0000 Received: by bwz25 with SMTP id 25so481662bwz.11 for ; Thu, 09 Jul 2009 13:16:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=Q5ehpvbyEsN9Skj7rPgH1FwdTToR/C134rmgkJliQqE=; b=K62GMisAo8d480z6Zu9OXi+gMX9Vop5TMzkMcpBx1k+GfDp1jUcY5d5k2DSbP4W18A jkTjY7ZMj0/l94TMopeuY7Ev106XoiAhSIAOnikfBuY+dBUnCHhWeAegjRk9LRvM2sgw +Q9ceuWmtF0M29hp3z8oUJsB7OgpWieqkya9s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=ZBNzXIslcWtD345eg43Ky4wQVob5Oi50Fxfv6rA5Cvhj1b0ZTKGM9GxZ+C8tqnECQP OX0FEHu3qCfEMDouA4OQ9LikB+mDGq5CTmDTHtHE1Blpw1vjndwPtuxk5WEd0Fp+m7Iz Lw1uubvGPw/71fvGnbH4pV0LilYCKShWzexCU= MIME-Version: 1.0 Received: by 10.103.218.9 with SMTP id v9mr642339muq.109.1247170585045; Thu, 09 Jul 2009 13:16:25 -0700 (PDT) In-Reply-To: References: <4A5632F8.5040406@disobey.com> Date: Thu, 9 Jul 2009 23:16:25 +0300 Message-ID: Subject: Re: Defining my document model when the source is entity-relationship From: Vlad GURDIGA To: user@couchdb.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Thu, Jul 9, 2009 at 9:46 PM, Thad Guidry wrote: > Morbus, > > I can think of one wiki article that helped me tremendously in understand= ing > the CouchDB way of relationships. =C2=A0And how I could apply that to lib= rary > cataloging techniques. > > http://wiki.apache.org/couchdb/EntityRelationship I apologize for the fact that I may be a little off-topic but reading this article a question came up regarding the second model presented in the "One to Many: Embedded Documents" section: { "_id":"Scott", "type":"contact", "name":"My Friend Scott", "phones":[{"home":"(650) 555 - 2200"},{"mobile":"(650) 555 - 2201"}], } What is the pros and cons of having phones stored as an array of associative hashes versus having them as an associative hash? Here is what I mean: { "_id":"Scott", "type":"contact", "name":"My Friend Scott", "phones":{"home":"(650) 555 - 2200","mobile":"(650) 555 - 2201"} } It seams to me more intuitive syntax.