Question 46
Consider a many-to-many relationship observed between courses and the students enrolled in these courses. Which of the following are true about modeling this many-to-many relationship with the document model in MongoDB?
Question 47
Suppose you have an accounts collection in your database. Only the following documents are stored in this collection: { _id: ObjectId("61af47c6e29861661d063714"), account_id: 1010, type: 'investment', limit: 2000000 }, { _id: ObjectId("61af47c6e29861661d063715"), account_id: 4336, type: 'derivatives', limit: 100000 }, { _id: ObjectId("61af47c6e29861661d063716"), account_id: 4336, type: 'commodity', limit: 1000 }, { _id: ObjectId("61af47c6e29861661d067825"), account_id: 7355, type: 'commodity', limit: 500000 }, { _id: ObjectId("61b1bde1ceb6f770f56b0cd9"), account_id: 4915, type: 'investment', limit: 2000000 } How many documents will be returned in response to the following aggregation pipeline? [{ $group: { _id: "$type", number_of_accounts: { $sum: 1 } }}, { $match: { number_of_accounts: { $gt: 1 } }}]
Question 48
Select true statements about unique compound indexes.
Question 49
Assign typical operational tasks to the Mongo Developer.
Question 50
In your database a movies collection is given where each document has the following structure: { _id: ObjectId("573a1391f29313caabcd9264"), genres: [ 'Romance', 'Drama' ], title: 'The Divorcee', languages: [ 'English', 'French' ], year: 1930, imdb: { rating: 6.9, votes: 1740, id: 20827 }, countries: [ 'USA' ] } Which of the following queries will return all movies that are in the Fantasy and Drama (both) genre?
