Answered You can hire a professional tutor to get the answer.

QUESTION

V595 - MongoDB Query Assignment Scenario RancidPineapple (RP) is a company that wants to launch a new web site focusing on movie reviews. They plan...

V595 - MongoDB Query Assignment

Scenario

RancidPineapple (RP) is a company that wants to launch a new web site focusing on movie reviews. They plan to use MongoDB to store and serve data about movies. In particular, they are focusing on a single document containing all the movie information, plus reviews as linked documents. These documents should have the following format:

Movie data - Name of movie, PineappleMetric (a number between 0 and 100), release year, rating, runtime, director [assume, for sake of simplicity, that each movie has a single director], a list of writers, production company (embedded, containing the name of the production company and its location), budget, a list of weekly box offices (most recent last)

Review data - Review author, date of review, review text, link to movie being reviewed

Assignment

Use the sample collections available in the end of this document to create the following queries (that is, the queries you provide below should work on the sample collections in the appendix):

a.      Retrieve all Movie documents (movies).

b.      Retrieve all Review documents (reviews).

c.      Retrieve all movies released in 2018.

d.      Retrieve all movies with a Pineapple Metric lower than 50.

e.      Retrieve all whose production company is located in the "UK".

f.       Retrieve the name and opening week box office (ONLY these "columns") from all movies.

g.      Retrieve all movies produced by "Rinse Wash Repeat"

h.      Retrieve all reviews written in 2018.

i.        Using the "_id" field, modify the text and author of one of the added reviews.

j.        Delete the review whose author is "Francis Pounder".

Note 1: Feel free to use Mlab.com and/or MongoChef (or other MongoDB interface) to implement and test your responses in this assignment. Enter your answer in this document by expanding the space between the items below and adding your replies there.

APPENDIX - COLLECTIONS

*** MOVIE DOCUMENTS - "MOVIES" COLLECTION***

{

   "_id": "1",

   "name": "Mission Impossible 5 - The AARP Threat",

   "pineappleMetric": "88",

   "releaseYear": "2018",

   "rating": "PG-13",

   "runtime": 136,

   "director": "Robert Silva",

   "writer": [

      "Mary Silva",

      "Mario Silva"

   ],

   "productionCompany": {

      "prodCompanyName": "Rinse Wash Repeat",

      "prodCompanyLocation": "USA"

   },

   "budget": 127000000,

   "boxOffice": [

      32000000,

      15000000

   ]

}

{

   "_id": "2",

   "name": "Die Hard - Resurrection",

   "pineappleMetric": "58",

   "releaseYear": "2019",

   "rating": "R",

   "runtime": 117,

   "director": "Joan Smith",

   "writer": [

      "Terry Smith",

      "Francine Smith"

   ],

   "productionCompany": {

      "prodCompanyName": "Yippee-Ki-Yay",

      "prodCompanyLocation": "Australia"

   },

   "budget": 63000000,

   "boxOffice": [

      19000000,

      7000000,

      5300000

   ]

}

{

   "_id": "3",

   "name": "Fifty Shades Greener",

   "pineappleMetric": "35",

   "releaseYear": "2018",

   "rating": "PG",

   "runtime": 98,

   "director": "Cookie Muster",

   "writer": [

      "Elmo Jones",

      "Sue Bird"

   ],

   "productionCompany": {

      "prodCompanyName": "Sesame Muppets",

      "prodCompanyLocation": "UK"

   },

   "budget": 17000000,

   "boxOffice": [

      58000000,

      43000000,

      27000000,

      13000000

   ]

}

*** REVIEW DOCUMENTS - "REVIEWS" COLLECTION ***

{

   "_id": "1",

   "reviewAuthor": "Timmy Twopence",

   "reviewDate": "2019-07-23",

   "reviewText": "It is an unexpected pleasure to have John McClane back as a zombie pursuing the nefarious masterminds behind a plan to dominate the world by transforming most of the population into undead slaves",

   "movieID": "2"

}

{

   "_id": "2",

   "reviewAuthor": "Sylvia Sterling",

   "reviewDate": "2018-06-12",

   "reviewText": "In this exciting movie, Ethan Hunt battles his worst enemy ever: a nafarious organization that advocates the retirement of actors when they are too old to play leads in action movies",

   "movieID": "1"

}

{

   "_id": "3",

   "reviewAuthor": "Francis Pounder",

   "reviewDate": "2018-12-04",

   "reviewText": "Kermit the Frog against a nefarious industrialist trying to pollute the world is a fun premise but the use of powerpoint slides during the movie is very distracting",

   "movieID": "3"

}

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question