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 88E8E8BBE for ; Sun, 11 Sep 2011 12:10:20 +0000 (UTC) Received: (qmail 85111 invoked by uid 500); 11 Sep 2011 12:10:19 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 84796 invoked by uid 500); 11 Sep 2011 12:10:12 -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 84788 invoked by uid 99); 11 Sep 2011 12:10:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 11 Sep 2011 12:10:11 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [74.125.82.180] (HELO mail-wy0-f180.google.com) (74.125.82.180) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 11 Sep 2011 12:10:04 +0000 Received: by wyj26 with SMTP id 26so3641316wyj.11 for ; Sun, 11 Sep 2011 05:09:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.227.204.14 with SMTP id fk14mr1351968wbb.88.1315742983885; Sun, 11 Sep 2011 05:09:43 -0700 (PDT) Received: by 10.227.39.24 with HTTP; Sun, 11 Sep 2011 05:09:43 -0700 (PDT) In-Reply-To: <4E6CA0E8.8080609@embedit.de> References: <4E6C972A.70002@embedit.de> <65C03448-3435-4B83-89CD-2B83F3D86797@utt.fr> <4E6CA0E8.8080609@embedit.de> Date: Sun, 11 Sep 2011 22:09:43 +1000 Message-ID: Subject: Re: Writing a Bulletin Board From: Nicholas Orr To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=00151747af1a2b927804aca94950 X-Virus-Checked: Checked by ClamAV on apache.org --00151747af1a2b927804aca94950 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable one first post (thus thread creation) you could create a thread and post doc, on the post doc store the thread_id. then a view could be by thread_id & post_create_date. The 1st post would be the author, or you could put that info in the thread doc. now you can find all posts belonging to a thread and like wise find all threads, even put threads in categories... thread: {_id:"thread1", categories: ["cat_id_1", "cat_id_2"], title: "My Thread"} post: {_id:"post1", created_at:"2011-01-01 12:34:09T1000", title: "My Post"= , body:"a interesting message", thread: "thread1", author:"person_id"} pretty much start coding and see what happens :) Nicholas Orr On Sun, Sep 11, 2011 at 9:52 PM, Markus Burrer wrote: > Am 11.09.2011 13:29, schrieb Aur=E9lien B=E9nel: > >> I want to write a simple Bulletin Board with CouchDB (and Python). Wha= t > >> is more reasonable? Create a document for each post or create one thre= ad > >> document and store all posts in this doc? > > I suppose there is a high probability for concurrent posts, therefore I > think storing them as different documents would be safer. > > > Ok, but than I need different documents for thread and post, because I > need different informations for threads and posts. Or do you think it's > better to put the thread informations into the first post doc? > > Regards > Markus > --00151747af1a2b927804aca94950--