Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Design a database using MongoDB to support the content management system of a blog. The database must store the following information: Articles: Page URL
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
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started