Answered step by step
Verified Expert Solution
Link Copied!

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.

  1. The database name is NetflixSeries followed by your ID. Ex: NetFlixSeries201835464
  2. Series is a collection with the following fields:
    1. SeriesID
    2. Title of series
    3. Year of release
    4. Genre (adventure, comedy, horror, thriller). A series can be associated with more than one Genre.
    5. Actor (first name and last name). A series can have more than one actor
    6. Director (first name and last name). A series can have more than one director.
    7. Number of seasons.
    8. Details. This includes of location of release, dates of release, and the series rating)

  1. An Actor collection with the following fields:
    1. Actor id
    2. First Name
    3. Last Name
    4. Address (street, city, country)
    5. Contact details (this includes email address and phone number)

Operations to Perform

  1. Insert at least 10 documents in the Series collection of which
    1. At least one document in associated with more than one genre
    2. At least one document with a series that was released in more than one location and on different dates.
    3. At least three documents for series released in the same year.
    4. At least two documents for series by the same director
    5. At least two documents for series with the actors Adam Sandler and Rob Schneider
  2. Insert at least 5 documents in the Actors collection
  3. Display all documents in the Series collection
  4. Display all documents in the Actors collection
  5. Add/update the rating of the series whose name start with a particular letter. (hint:use findAndUpdate())
  6. Delete a series with a particular title.
  7. Update the actors email where the actor ID is = sampleID
  8. Update the genre for a particular series..Add a new genre..do not replace.
  9. 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Access Patterns Database Interactions In Object Oriented Applications

Authors: Clifton Nock

1st Edition

0321555627, 978-0321555625

More Books

Students also viewed these Databases questions

Question

What is the Definition for Third Normal Form?

Answered: 1 week ago

Question

Provide two examples of a One-To-Many relationship.

Answered: 1 week ago