Exercise : 1
Create a database for movies
- Collection - movies
- Collection - users
Movies Collection
- name, imdb_rating, release date, genres : [],
description : {summary : "...", star : [], directors : []}
release_date : new Date("2021-8-12")
- Insert at least 10 documents
Users Collection
- name, emailId,
movies_watched : {count : 2, names : ["Avengers", "Thor"],
"rating" : [7.8, 8.9],
"review" : ["Good", "Amazing"]}
- Insert at least 5 documents
Queries
- Find all movies directed by "XYZ".
- Find movies whose rating is above 8.0
- Find movies whose genre is action and comedy
- Find movies whose genre is only action
- Find movies whose review contains positive(good/best/awesome..) words
- Find users who has watched more than 2 movies
- Find users who has given 8 rating to Avengers Movies
- Find users who has watched only 1 movie till now.
- Find movies whose imdb rating is not greater than 8
- Find movies where either imdb rating is above 8 or genre is action
- Find movies where rating is above 8 and actor is "XYZ"
- Find movies where summary contains word "power"
- Find reviews from users collection where review contains bad words