Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Purpose: The purpose of this assignment is to write mongodb CRUD queries and operations. Kindly note that the assignment has no real database connection. To
Purpose: The purpose of this assignment is to write mongodb CRUD queries and operations. Kindly note that the assignment has no real database connection. To insert data in the collections you can prepare a JSON file then import it via MongoCompass or add them using insert. In both cases, you need to submit the JSON or the insert operations.
You can use MongoCompass/MongoShell to monitor the collections and confirm your operations are successful.
Save your answers to a text file. Submit the text file.
- The database name is NetflixSeries followed by your ID. Ex: NetFlixSeries201835464
- Series is a collection with the following fields:
- SeriesID
- Title of series
- Year of release
- Genre (adventure, comedy, horror, thriller). A series can be associated with more than one Genre.
- Actor (first name and last name). A series can have more than one actor
- Director (first name and last name). A series can have more than one director.
- Number of seasons.
- Details. This includes of location of release, dates of release, and the series rating)
- An Actor collection with the following fields:
- Actor id
- First Name
- Last Name
- Address (street, city, country)
- Contact details (this includes email address and phone number)
Operations to Perform
- Insert at least 10 documents in the Series collection of which
- At least one document in associated with more than one genre
- At least one document with a series that was released in more than one location and on different dates.
- At least three documents for series released in the same year.
- At least two documents for series by the same director
- At least two documents for series with the actors Adam Sandler and Rob Schneider
- Insert at least 5 documents in the Actors collection
- Display all documents in the Series collection
- Display all documents in the Actors collection
- Add/update the rating of the series whose name start with a particular letter. (hint:use findAndUpdate())
- Delete a series with a particular title.
- Update the actors email where the actor ID is = sampleID
- Update the genre for a particular series..Add a new genre..do not replace.
- Delete all the actors in the series that has number of seasons greater than 2. (hint: use remove())
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