Understanding NoSQL Data Modeling - blog application
Posted
by
Rushabh RajeshKumar Padalia
on Stack Overflow
See other posts from Stack Overflow
or by Rushabh RajeshKumar Padalia
Published on 2013-06-25T05:38:13Z
Indexed on
2013/06/25
16:21 UTC
Read the original article
Hit count: 171
I am creating an blogging application in Node.js + MongoDB Database. I have used relational Database like MySQL before but this is my first experience with NoSQL database. So I would like to conform my MongoDB data models before I move further.
I have decided my blogDB to have 3 collections
- post_collection - stores information about that article
- comment_collection - store information about comments on articles
- user_info_collection - contains user inforamtion
PostDB
{
_"id" : ObjectID(...),
"author": "author_name",
"Date": new Date(....),
"tag" : ["politics" , "war"],
"post_title": "My first Article",
"post_content": "Big big article"
"likes": 23
"access": "public"
}
CommentDB
{
"_id" : Objectid(...),
"POST": "My First Article",
"comment_by": "User_name",
"comment": "MY comments"
}
UserInfoDB
{
"_id": ObjectID(...),
"user": "User_name",
"password": "My_password"
}
I would appreciate your comments.
© Stack Overflow or respective owner