couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicholas Orr <>
Subject Re: Writing a Bulletin Board
Date Sun, 11 Sep 2011 12:09:43 GMT
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
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élien Bénel:
> >> I want to write a simple Bulletin Board with CouchDB (and Python). What
> >> is more reasonable? Create a document for each post or create one thread
> >> 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

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message