incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From He Shiming <>
Subject Design question, article with logs of comments and ratings
Date Fri, 25 Feb 2011 03:51:13 GMT

I've got a design question. The scenario is: the database stores a
series of articles, and each article can be commented and rated.

For articles, naturally I'll have {"_id": "article-id", "type":
"article" ...} . And each article is a single document in the

I'm not sure what form should I use to put ratings and comments. I
would like to keep a history of rating and comments for each article,
but still be able to calculate average rating easily. I may also need
"likes" and "dislikes" for each of the comment. So it'll be sorted in
a custom order.

How do I design documents to store such information? Thanks!

Best regards,
He Shiming

View raw message