Hi,
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
database.
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