Question
I just needed some help with writing these queries on MongoDB. Description We will use MongoDB Community Edition 4.4 and the following collections: Movies People
I just needed some help with writing these queries on MongoDB.
Description
We will use MongoDB Community Edition 4.4 and the following collections:
Movies | People |
{ _id : , otitle : , ptitle : , adult : , year : , runtime : , rating : , totalvotes : , genres : [ ] } | { _id : , name : , byear : , dyear : } |
MoviesDenorm | PeopleDenorm |
{ _id : , actors : [ ], directors : [ ], producers : [ ], writers : [ ] } | { _id : , acted : [ ] , directed : [ ] , knownfor : [ ] , produced : [ ] , written : [ ] } |
The _id fields are the ids used in the relational database. The genres fields are arrays with the names of the genres (not the ids). The rest of the arrays include person or movie ids. Empty arrays are not allowed. For instance, a movie without genres should not contain any genres field. The rest of the fields are those that translate directly from the relational database. Null fields are not allowed. For example, an alive person should not contain any dyear field. You can find a dump of these collections in myCourses. You must use the dump for the queries.
2.3.- Alive writers who have produced at least one movie, and have written more than ten Action movies between 1975 and 1995.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started