They plan use mongodb store and serve data about movies
MongoDB Query Assignment
Question 1
Assignment
Part 1
Retrieve all documents in the movies collection.
Answer:
Retrieve all movies whose production company is located in the “UK”.
Answer:
Retrieve all reviews written in 2018 (notice the format of that field as you develop your answer).
Answer:
You will now practice writing some aggregate queries with MongoDB
Visit the following site:
Question 3
You will explore movies data from the MovieLens database (http://grouplens.org/datasets/movielens/). Use the small dataset (same as what you used in the Hive assignment) from the category MovieLens Latest Datasets section. You will only need to create a collection for the movies and ratings data to answer the below questions.
Generate the movies that have been categorized into more than 2 genres
Generate a list of movies that have the “Children” genre and a user rating > 3
*** MOVIE DOCUMENTS - “MOVIE” COLLECTION ***
{
"releaseYear": "2018",
"rating": "PG-13",
"Mario Silva"
],
"budget": 127000000,
"boxOffice": [
{
"_id": self generate,
"rating": "R",
"runtime": 117,
],
"productionCompany": {
"boxOffice": [
19000000,
{
"_id": self generate,
"rating": "PG",
"runtime": 98,
],
"productionCompany": {
"boxOffice": [
58000000,
}
*** REVIEW DOCUMENTS - “REVIEW” COLLECTION ***
"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",
"reviewId": "2",
"reviewAuthor": "Sylvia Sterling",
{
"_id": self generate,
"movieID": "3"
}