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 0754010BDD for ; Wed, 20 Nov 2013 19:19:16 +0000 (UTC) Received: (qmail 71733 invoked by uid 500); 20 Nov 2013 19:19:14 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 71634 invoked by uid 500); 20 Nov 2013 19:19:14 -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 71626 invoked by uid 99); 20 Nov 2013 19:19:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Nov 2013 19:19:14 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jens@couchbase.com designates 206.225.164.31 as permitted sender) Received: from [206.225.164.31] (HELO EXHUB020-4.exch020.serverdata.net) (206.225.164.31) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Nov 2013 19:19:08 +0000 Received: from EXVMBX020-1.exch020.serverdata.net ([169.254.4.151]) by EXHUB020-4.exch020.serverdata.net ([206.225.164.31]) with mapi; Wed, 20 Nov 2013 11:18:46 -0800 From: Jens Alfke To: "user@couchdb.apache.org" , John Norris Date: Wed, 20 Nov 2013 11:18:42 -0800 Subject: Re: couchdb data structure Thread-Topic: couchdb data structure Thread-Index: Ac7mJVS5i27qeRCFQAyhNwCzXKlidg== Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: multipart/alternative; boundary="_000_AE111B1889CB4AC4881EEC5814869F9Acouchbasecom_" MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org --_000_AE111B1889CB4AC4881EEC5814869F9Acouchbasecom_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable On Nov 19, 2013, at 2:28 AM, John Norris > wrote: But in couchdb, a database is a number of documents? And those documents can represent several object types? So do I need each document to have a field representing what type it is? (eg a field that is unique to that document type). Yes. The convention is a property called =93type=94 whose value is a string= identifying that type of document. The type names generally just need to b= e unique within your database. Or does each document type go in its own database? No. There=92s almost never a need to split an app into multiple databases. =97Jens --_000_AE111B1889CB4AC4881EEC5814869F9Acouchbasecom_--