MongoDB Certified Developer Associate - C100DEV Exam Practice Test
Select all true statements regarding to duplicate documents in MongoDB.
Correct Answer: B
Vote an answer
We have the following index in a movies collection: { title: 1, genres: 1 } We want to insert the following document: { "title": "The Immigrant", "year": 1917, "genres": [ "Short", "Comedy", "Drama" ] } How many index entries will be created?
Correct Answer: D
Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).
Suppose you have an accounts collection with the following document structure: { _id: ObjectId("61af47c6e29861661d063714"), account_id: 1010, type: 'investment', limit: 1000000 }, { _id: ObjectId("61af47c6e29861661d063715"), account_id: 4336, type: 'derivatives', limit: 100000 }, { _id: ObjectId("61af47c6e29861661d063716"), account_id: 4336, type: 'commodity', limit: 1000 } Which of the following documents would be modified by this update? db.accounts.updateMany( { "type": "investment" }, { "$set": { "limit": 2000000 } } )
Correct Answer: C,D
Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).
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 extract all movies from this collection where genres includes both 'Crime' and 'Mystery'. Which query should we use?
Correct Answer: A
Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).
Suppose you have a sales collection with the following document structure: { _id: ObjectId("5bd761dcae323e45a93ccfe8"), saleDate: ISODate("2015-03-23T21:06:49.506Z"), items: [ { name: 'printer paper', tags: [ 'office', 'stationary' ], price: Decimal128("40.01"), quantity: 2 } { name: 'pens', tags: [ 'writing', 'office', 'school', 'stationary' ], price: Decimal128("56.12"), quantity: 5 }, { name: 'notepad', tags: [ 'office', 'writing', 'school' ], price: Decimal128("18.47"), quantity: 2 } ], storeLocation: 'Denver', couponUsed: true, purchaseMethod: 'Online' } Which of the following queries will return all document sales with 'printer paper' sold?
Correct Answer: C
Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).
Which collection method do you need to use to drop a specific collection?
Correct Answer: D
Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).
What is MongoDB Compass?
Correct Answer: B
Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).
Which of the following processes are heavily reliant on available CPU?
Correct Answer: A,B,C
Vote an answer
We have a restaurants collection with the following document structure: { _id: ObjectId("5eb3d668b31de5d588f42a7d"), address: { building: '605', coord: [ -74.0060152, 40.7372653 ], street: 'Hudson Street', zipcode: '10014' }, cuisine: 'French', grades: [ { date: ISODate("2014-06-30T00:00:00.000Z"), grade: 'A', score: 10 }, { date: ISODate("2013-05-20T00:00:00.000Z"), grade: 'A', score: 13 }, { date: ISODate("2012-12-11T00:00:00.000Z"), grade: 'A', score: 9 } ], name: 'La Ripaille Restaurant' } We need to use Aggregation Framework to calculate the total number of restaurants for top 5 cuisine (sorted in descending order by the number of restaurants). Expected output: [ { _id: 'American', total_restaurants: 6183 }, { _id: 'Chinese', total_restaurants: 2418 }, { _id: 'Cafao/Coffee/Tea', total_restaurants: 1214 }, { _id: 'Pizza', total_restaurants: 1163 }, { _id: 'Italian', total_restaurants: 1069 } ] Which pipeline should you use?
Correct Answer: A
Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).
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 extract all 'Crime' movies from this collection. Which query should we use? Check all that apply.
Correct Answer: A,B
Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).
The users collection in the database is given. Which field will be the best candidate for an index in terms of cardinality?
Correct Answer: B
Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).
Is MongoDB a NoSQL database?
Correct Answer: B
Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).