Design a database using MongoDB to support the content management system of a blog. The database must
Fantastic news! We've Found the answer you've been seeking!
Question:
Design a database using MongoDB to support the content management system of a blog. The database must store the following information:
- Articles:
- Page URL
- Article title
- Article ID
- Page Content
- Author name
- Author email
- Author picture URL
- Author short bio
- Comments
- Each article can have 0 or unlimited number of comments
- Content of comment
- Date and time posted
- Handle of comment poster
- ID
- Views and activity
- User agent
- Date and time
- Description of event (view, like, share)
- Type (comment, article)
- Content ID
Deliverable:
- Code to create the data to be inserted to the database
- Insert at least 12 articles
- Each article must have a random number of likes
- Each article must have at least one comment
- At least one comment must be liked
- Query to aggregate and calculate:
- Number of views per article
- Average number of comments per article
- Article ID of the most liked article
Related Book For
Principles Of Database Management The Practical Guide To Storing Managing And Analyzing Big And Smal
ISBN: 9781107186125
1st Edition
Authors: Wilfried Lemahieu, Seppe Vanden Broucke, Bart Baesens
Posted Date: