N. G.
Patel Polytechnic
Semester-6
NoSQL Micro-Project
Topic : Movies Collection
Group Members:
Barodia Deep J :-226370307003
Kumawat Pavan R :- 226370307039
Patel Uday P :-236378307031
Topic : Movies Collection
1. {"title": "All The Best Pandya","director": "Rahul Bhole, Vinit
Kanojia","genre": "Family, Drama","rating":
8.0,"release_year": 2025,"movie_id": "M001"},
2. {"title": "Chhava","director": "Laxman Utekar","genre": "Historical,
Drama","rating": 7.4,"release_year": 2024,"movie_id": "M002"},
3. {"title": "Vettaiyan","director": "T.J. Gnanavel","genre": "Action,
Drama, Thriller","rating": 7.0,"release_year": 2024,"movie_id":
"M003"},
4. {"title": "Naadi Dosh","director": "Krishnadev Yagnik, Chinmay
Parmar","genre": "Drama, Romance","rating":
7.2,"release_year": 2022,"movie_id": "M004"},
5. {"title": "Raado","director": "Krishnadev Yagnik","genre":
"Thriller, Drama","rating": 8.6,"release_year": 2022,"movie_id":
"M005"},
6. {"title": "Gajab Thai Gayo!","director": "Neeraj Joshi","genre":
"Comedy, Sci-Fi","rating": 6.7,"release_year": 2022,"movie_id":
"M006"},
7. {"title": "3 Idiots","director": "Rajkumar Hirani","genre":
"Comedy, Drama","rating": 8.4,"release_year": 2009,"movie_id":
"M007"},
8. {"title": "Chhichhore","director": "Nitesh Tiwari","genre":
"Comedy, Drama","rating": 8.3,"release_year": 2019,"movie_id":
"M008"},
9. {"title": "Chello Divas","director": "Krishnadev Yagnik","genre":
"Comedy, Drama","rating": 8.5,"release_year": 2015,"movie_id":
"M009"},
10.{"title": "Rajni - The Jailer","director": "Nelson Dilipkumar","genre":
"Action, Crime, Drama","rating": 7.2,"release_year":
2023,"movie_id": "M010"},
11.{"title": "Ala Vaikunthapurramuloo","director": "Trivikram
Srinivas", "genre": "Action, Drama, Comedy","rating":
7.3,"release_year": 2020,"movie_id": "M011"},
12.{"title": "DJ","director": "Harish Shankar","genre": "Action,
Drama, Romance","rating": 5.6,"release_year": 2017,"movie_id":
"M012"},
13.{"title": "Pushpa: The Rise - Part 1","director": "Sukumar","genre":
"Action, Drama, Thriller","rating": 7.6,"release_year": 2021,"movie_id":
"M013"},
14.{"title": "Godfather","director": "Mohan Raja","genre": "Action,
Drama, Thriller","rating": 5.8,"release_year": 2022,"movie_id":
"M014"},
15.{"title": "K.G.F.: Chapter 1","director": "Prashanth Neel","genre":
"Action, Drama, Thriller","rating": 8.2,"release_year": 2018,"movie_id":
"M015"}
Collection of restaurants :
1. Write a MongoDB query to display all the movies:
db.movies.find();
2. Write a MongoDB query to display all the movies with rating greater than 8:
db.movies.find({ "rating": { $gt: 8 } });
3. Write a MongoDB query to find the movies which are either "Action" or "Comedy"
genre:
db.movies.find({$or: [{ "genre": { $regex: "Action" } }, { "genre": { $regex:"Comedy"}}]});
4. Write a MongoDB query to find movies which are both "Action and Comedy"
genre:
db.movies.find({$and: [{ "genre": { $regex: "Action" } }, { "genre":{$regex:"Comedy"}}]});
5. Write a MongoDB query to find movies which are both "Thriller and
Drama" genre:
db.movies.find({$and: [{ "genre": { $regex: "Thriller" } }, { "genre":{ $regex:"Drama"}}]});
6. Write a MongoDB query to find movies with 5 or 8 rating:
db.movies.find({ "rating": { $in: [5, 8] } });
7. Write a MongoDB query to find movies with rating less than 6:
db.movies.find({ "rating": { $lt: 6 } });
8. Write a MongoDB query to find all Action movies:
db.movies.find({ "genre": { $regex: "Action" } });
9. Write a MongoDB query to find movies with rating between 7 and 9:
db.movies.find({ "rating": { $gte: 7, $lte: 9 } });
10. Write a MongoDB query to find movies released after 2020:
db.movies.find({ "release_year": { $gt: 2020 } });