C100DEV 無料問題集「MongoDB Certified Developer Associate」
We have a movies collection with the following document structure: { _id: ObjectId("573a1390f29313caabcd6223"), genres: [ 'Comedy', 'Drama', 'Family' ], title: 'The Poor Little Rich Girl', released: ISODate("1917-03-05T00:00:00.000Z"), year: 1917, imdb: { rating: 6.9, votes: 884, id: 8443 } } We need to use Aggregation Framework to fetch all movies from this collection where 'Drama' is in genres list and the minimum 'imdb.votes' is at least 100. Additionally, in the projection stage, we want to leave only the following fields: -> title -> genres -> imdb.votes Example output: { title: 'Miss Lulu Bett', genres: [ 'Comedy', 'Drama' ], imdb: { votes: 204 } } Which pipeline should you use?
正解:C
解答を投票する
解説: (JPNTest メンバーにのみ表示されます)
Suppose you have a reviews collection in your database and you want to optimize the following query: db.reviews.find( { "votes": { "$gt": 100 }, "rating": 4.5 } ).sort( { "date": 1 } ) Which index on this collection will be the most performant for the above query? Keep in mind the equality, sort, range rule.
正解:A
解答を投票する
解説: (JPNTest メンバーにのみ表示されます)
We can use this pattern to work with different schema versions. It mainly involves adding a new field to the document structure, such as schema_version. This field will allow our application to know how to handle particular document. Which pattern does this description apply to?
正解:B
解答を投票する
解説: (JPNTest メンバーにのみ表示されます)