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 4970B44C5 for ; Sat, 9 Jul 2011 19:35:15 +0000 (UTC) Received: (qmail 9260 invoked by uid 500); 9 Jul 2011 19:35:13 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 9165 invoked by uid 500); 9 Jul 2011 19:35:13 -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 9157 invoked by uid 99); 9 Jul 2011 19:35:12 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 09 Jul 2011 19:35:12 +0000 Received: from localhost (HELO mail-iy0-f180.google.com) (127.0.0.1) (smtp-auth username rnewson, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Sat, 09 Jul 2011 19:35:12 +0000 Received: by iyh42 with SMTP id 42so5109806iyh.11 for ; Sat, 09 Jul 2011 12:35:11 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.80.209 with SMTP id u17mr2936294ibk.184.1310240111898; Sat, 09 Jul 2011 12:35:11 -0700 (PDT) Received: by 10.231.145.67 with HTTP; Sat, 9 Jul 2011 12:35:11 -0700 (PDT) In-Reply-To: References: Date: Sat, 9 Jul 2011 20:35:11 +0100 Message-ID: Subject: Re: RESTful document structure From: Robert Newson To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 REST does not require that you use only one type of document per database. Even if it did, I'd strongly advise violating a rule as silly as that. Put whatever documents into your database as you please. B. On 9 July 2011 19:39, Johnny Weng Luu wrote: > Since CouchDB is implementing a RESTful API, doesn't that mean I wanna put > all documents of the same type in their own database? > > eg. > > POST http://localhost/users > GET http://localhost/users/1 > PUT http://localhost/users/1 > DELETE http://localhost/users/1 > > POST http://localhost/threads > GET http://localhost/threads/1 > PUT http://localhost/threads/1 > DELETE http://localhost/threads/1 > > Rather than putting them all in one big database (http://localhost/my_app). > > Doesn't a 100% RESTful approach mean that the former is more correct? >