From user-return-7895-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Sun Dec 06 22:01:56 2009 Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 4808 invoked from network); 6 Dec 2009 22:01:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 6 Dec 2009 22:01:56 -0000 Received: (qmail 47002 invoked by uid 500); 6 Dec 2009 22:01:55 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 46919 invoked by uid 500); 6 Dec 2009 22:01: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 46909 invoked by uid 99); 6 Dec 2009 22:01:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Dec 2009 22:01:54 +0000 X-ASF-Spam-Status: No, hits=3.4 required=10.0 tests=HTML_MESSAGE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.217.211] (HELO mail-gx0-f211.google.com) (209.85.217.211) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Dec 2009 22:01:46 +0000 Received: by gxk3 with SMTP id 3so2475151gxk.15 for ; Sun, 06 Dec 2009 14:01:24 -0800 (PST) MIME-Version: 1.0 Received: by 10.101.132.5 with SMTP id j5mr5174847ann.108.1260136884382; Sun, 06 Dec 2009 14:01:24 -0800 (PST) Date: Sun, 6 Dec 2009 17:01:24 -0500 Message-ID: <741a4d620912061401s172d43d2pf2a84ae2d3589150@mail.gmail.com> Subject: Design Question From: Matthew Gamble To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=0016e68ea0d55cacaf047a167bd7 X-Virus-Checked: Checked by ClamAV on apache.org --0016e68ea0d55cacaf047a167bd7 Content-Type: text/plain; charset=ISO-8859-1 I'm been trying to wrap my head around how to layout my application in couchDB for the past few days and I can't seem to figure out which is the best way of doing it. I'm sorry if a question like this has been asked before, but I couldn't find anything in the archives that was quite the same as what I'm trying to do. In a nutshell, I'd like to store addresses (VCard like data) for users. My first thought was a single document per-user with each VCard as an attachment but that made it very hard to search the data as it required the client side to download and parse everything for a search. My next idea was a document for each VCard and a key (user_id, for example) to denote which user the card belongs to. This is quick to access with a view, and might be the right way to do this? Or is it best to put each user as their own database and store the address books / VCards as documents? To give you an idea of the scale, I'm looking at 100-200k unique users with (up to) 5000 VCards each. I really like the idea of using CouchDB to store the address book / vcard data as it lets me only enter the data that's actual used. Thanks in advance for any advice - like I said, I'm still trying to wrap my head around the way CouchDB works. --0016e68ea0d55cacaf047a167bd7--