
MongoDB C100DEV Exam Preparation Guide and PDF Download
Verified & Correct C100DEV Practice Test Reliable Source Jan 10, 2024 Updated
To become a MongoDB Certified Developer Associate, candidates must pass a challenging exam that tests their knowledge of MongoDB architecture, programming concepts, and best practices. C100DEV exam consists of multiple-choice questions and practical scenarios that simulate real-world development situations. Successful candidates receive a certificate that recognizes their expertise in working with MongoDB and demonstrates their ability to develop scalable and reliable applications. MongoDB Certified Developer Associate Exam certification is recognized as a valuable credential by leading employers in the tech industry and can enhance career opportunities for developers.
NEW QUESTION # 125
Select true statements about unique compound indexes.
- A. MongoDB doesn't support unique compound indexes.
- B. In unique compound indexes, individual keys must have unique values, and a particular combination of key values must also be unique at the collection level.
- C. In unique compound indexes, individual keys can have duplicate values, and a particular combination of key values must be unique at the collection level.
Answer: C
Explanation:
https://docs.mongodb.com/manual/core/index-compound/
NEW QUESTION # 126
Suppose you want to join two collections in the same database. What aggregation stage do you need to use?
- A. $project
- B. $out
- C. $lookup
Answer: C
Explanation:
https://docs.mongodb.com/manual/reference/operator/aggregation/lookup/
NEW QUESTION # 127
Select all true statements regarding to Aggregation Framework.
- A. The query in a $match stage can not be entirely covered by an index.
- B. The Aggregation Framework will automatically reorder stages in a certain conditions (for optimization).
Answer: B
Explanation:
https://docs.mongodb.com/manual/aggregation/
NEW QUESTION # 128
Suppose we have a shipwrecks collection with the following document structure: { _id: ObjectId("578f6fa2df35c7fbdbaed8ce"), feature_type: 'Wrecks - Visible', watlev: 'always dry', coordinates: [ -79.9469681, 9.3729954 ] } You ran the command below: db.shipwrecks.getIndexes() And you got the following output: [ { v: 2, key: { _id: 1 }, name: '_id_' }, { v: 2, key: { coordinates: '2dsphere' }, name: 'coordinates_2dsphere', '2dsphereIndexVersion': 3 } ] How can you remove the geospatial index on the coordinates field?
- A. db.shipwrecks.dropIndex('coordinates_2dsphere')
- B. db.shipwrecks.dropCollection('coordinates_2dsphere')
- C. db.shipwrecks.dropIndex('_id_')
Answer: A
Explanation:
https://docs.mongodb.com/manual/core/2dsphere/
NEW QUESTION # 129
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 does not include 'Romance'. Which query should we use?
- A. db.movies.find( { genres: { $nin: ['Romance'] } } )
- B. db.movies.find( { genres: { $and: ['Romance'] } } )
- C. db.movies.find( { genres: { $or: ['Romance'] } } )
- D. db.movies.find( { genres: { $in: ['Romance'] } } )
Answer: A
Explanation:
https://docs.mongodb.com/manual/reference/operator/query/nin/
NEW QUESTION # 130
We can use REGEX in our queries in MongoDB - JavaScript regular expression syntax.
- A. False
- B. True
Answer: B
Explanation:
https://docs.mongodb.com/manual/reference/operator/query/regex/
NEW QUESTION # 131
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?
- A. When using one collection for students and one collection for courses there is a need for an array of references in only one collection.
- B. Embedding students in courses duplicates student information.
- C. The many-to-many relationship cannot be represented in MongoDB.
- D. Embedding students in courses still requires a separate collection to store all students (we may have students who are not enrolled in any course).
Answer: A,B,D
Explanation:
https://docs.mongodb.com/manual/applications/data-models-relationships/
NEW QUESTION # 132
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.
- A. db.movies.find( { "genres": { "$nin" : ["Crime"] } } )
- B. db.movies.find( { "genres": { "$in" : ["Crime"] } } )
- C. db.movies.find( { "genres": "Crime" } )
Answer: B,C
Explanation:
https://docs.mongodb.com/manual/reference/method/db.collection.find/
NEW QUESTION # 133
Select all true statements about the differences between mongoexport and mongodump.
- A. By default, mongodump sends output to stdout, but mongoexport writes to a file.
- B. mongoexport outputs JSON file, but mongodump outputs BSON file.
- C. mongodump can create a data file and a metadata file, but mongoexport just creates a data file.
- D. mongoexport outputs BSON file, but mongodump outputs JSON file.
- E. mongodump is typically faster than mongoexport
Answer: B,C,E
Explanation:
https://docs.mongodb.com/database-tools/mongoexport/ https://docs.mongodb.com/database-tools/mongodump/
NEW QUESTION # 134
Select all true statements about auto bucketing feature in Aggregation Framework. ($bucketAuto stage)
- A. The syntax for this stage is as follows:
- B. This stage distributes documents evenly across predefined number of buckets.
- C. The granularity option allows us to specify preferred bucket boundaries.
Answer: A,B,C
Explanation:
https://docs.mongodb.com/manual/reference/operator/aggregation/bucketAuto/
NEW QUESTION # 135
Which of the following documents are valid JSON format? (select 2)
- A. {"_id": 1, "address": {"street": "Stillwell Avenue", "zipcode": "11224"}}
- B. {_id: 1, name: "Riviera Caterer", cuisine: "American"}
- C. {"_id": 1, "name": "Riviera Caterer", "cuisine": "American"}
- D. ["_id": 1, "name": "Riviera Caterer", "cuisine": "American"]
- E. <"_id": 1, "name": "Riviera Caterer", "cuisine": "American">
Answer: A,C
Explanation:
While some software may not throw an error, this is still not valid JSON because each field name should be in quotes: {_id: 1, name: "Riviera Caterer", cuisine: "American"} Square brackets instead of curly ones: ["_id": 1, "name": "Riviera Caterer", "cuisine": "American"] The rest of the examples are self-evident. https://www.mongodb.com/json-and-bson
NEW QUESTION # 136
What is MongoDB Compass?
- A. A map-based chart type that is available with MongoDB Charts.
- B. It is a GUI for MongoDB.
- C. Special data type in MongoDB to store geospatial data.
Answer: B
Explanation:
https://docs.mongodb.com/compass/current/
NEW QUESTION # 137
Select all true statements regarding to replica sets in MongoDB.
- A. Replica set members have a fixed role assigned.
- B. Replica sets use failover to provide high availability to client applications.
- C. We can have up to 50 replica set members, but only 7 of those will be voting members.
Answer: B,C
Explanation:
Replica set members have a fixed role assigned. -> False The availability of the system will be ensured by failing over the role of primary to an available secondary node through an election. https://docs.mongodb.com/manual/replication/
NEW QUESTION # 138
Select all default configurations for mongod.
- A. The default data directory for mongod is /data/db
- B. By default, mongod doesn't enforce authentication.
- C. By default, mongod is only bound to localhost (or 127.0.0.1).
- D. The default port for mongod is 27017.
Answer: A,B,C,D
Explanation:
https://docs.mongodb.com/manual/reference/configuration-options/
NEW QUESTION # 139
We have a movies collection with the following document structure: { _id: ObjectId("573a1390f29313caabcd60e4"), title: 'The Immigrant', released: ISODate("1917-06-17T00:00:00.000Z"), rated: 'UNRATED', year: 1917, imdb: { rating: 7.8, votes: 4680, id: 8133 } } We need to filter those movies where the imdb rating is greater then 7. Which query should we use?
- A. db.movies.find( { imdb.rating: { "$gt": 7 } } )
- B. db.movies.find( { "imdb.rating": { "$gt": 7 } } )
- C. db.movies.find( { "imdb.rating": { "$gte": 7 } } )
Answer: B
Explanation:
https://docs.mongodb.com/manual/reference/method/db.collection.find/
NEW QUESTION # 140
Which of the following processes are heavily reliant on available CPU?
- A. Aggregation
- B. Read operations
- C. Write operations
Answer: A,B,C
NEW QUESTION # 141
Select all true statements about query plans in MongoDB. (select 2)
- A. Query plans are cached so that plans don't have to be generated and compared with each other each time a query is executed.
- B. For a given query, each index in the collection generates at least one query plan.
- C. If there are no indexes for the query, the main stage in the query plan will be the COLLSCAN stage.
Answer: A,C
Explanation:
https://docs.mongodb.com/manual/core/query-plans/
NEW QUESTION # 142
Select true statements about shard keys.
- A. Shard keys can include the _id field, but they don't have to.
- B. All shard keys must be supported by an index with the same document fields.
- C. Shard keys are used to organize documents into chunks and shards, and mongos can use this to route queries.
Answer: A,B,C
Explanation:
https://docs.mongodb.com/manual/core/sharding-shard-key/
NEW QUESTION # 143
In your database there is a movies collection with the following document structure: { _id: ObjectId("573a1390f29313caabcd42e8"), genres: [ 'Short', 'Western' ], title: 'The Great Train Robbery', rated: 'TV-G', year: 1903, imdb: { rating: 7.4, votes: 9847, id: 439 }, countries: [ 'USA' ] }, { _id: ObjectId("573a1390f29313caabcd4323"), genres: [ 'Short', 'Drama', 'Fantasy' ], rated: 'UNRATED', title: 'The Land Beyond the Sunset', year: 1912, imdb: { rating: 7.1, votes: 448, id: 488 }, countries: [ 'USA' ] }, { _id: ObjectId("573a1390f29313caabcd446f"), genres: [ 'Short', 'Drama' ], title: 'A Corner in Wheat', rated: 'G', year: 1909, imdb: { rating: 6.6, votes: 1375, id: 832 }, countries: [ 'USA' ] } How can you group these documents to extract the distribution of rated field?
- A. db.movies.aggregate( { $group: { _id: 'rated', count: { $sum: 1 } } } )
- B. db.movies.aggregate( { $group: { _id: '$rated', $count: { $sum: 1 } } } )
- C. db.movies.aggregate( { $group: { _id: '$rated', count: { $sum: 1 } } } )
- D. db.movies.aggregate( { $group: { _id: '$rated', count: { $avg: 1 } } } )
Answer: C
Explanation:
https://docs.mongodb.com/manual/reference/method/db.collection.aggregate/
NEW QUESTION # 144
Suppose you have a companies collection in your database. Only the following documents are stored in this collection:
{ _id: ObjectId("52cdef7c4bab8bd675297da4"), name: 'Powerset', category_code: 'search', founded_year: 2006 }, { _id: ObjectId("52cdef7c4bab8bd675297da5"), name: 'Technorati', category_code: 'advertising', founded_year: 2002 }, { _id: ObjectId("52cdef7c4bab8bd675297da7"), name: 'AddThis', category_code: 'advertising', founded_year: 2004 }, { _id: ObjectId("52cdef7c4bab8bd675297da8"), name: 'OpenX', category_code: 'advertising', founded_year: 2008 }, { _id: ObjectId("52cdef7c4bab8bd675297daa"), name: 'Sparter', category_code: 'games_video', founded_year: 2007 }, { _id: ObjectId("52cdef7c4bab8bd675297dac"), name: 'Veoh', category_code: 'games_video', founded_year: 2004 }, { _id: ObjectId("52cdef7c4bab8bd675297dae"), name: 'Thoof', category_code: 'web', founded_year: 2006 }
How many documents will be deleted when executing the following query?
db.companies.deleteMany( { "category_code": "advertising" } )
- A. 0
- B. 1
- C. 2
- D. 3
Answer: B
Explanation:
https://docs.mongodb.com/manual/reference/method/db.collection.deleteMany/
NEW QUESTION # 145
Given a companies collection where each document has the following structure:
{ _id: ObjectId('61a8b90c6d5ce6a7d8fef95e'), name: 'Facebook', tag_list: ['facebook', 'college', 'students', 'network'], description: 'Social network' }
Which of the following commands will add new fields to the updated documents?
- A. db.companies.updateMany({ "name": "Facebook" }, { "$set": { "description": "Social media" } })
- B. db.companies.updateMany({ "name": "Facebook" }, { "$set": { "country": "USA" } })
- C. db.companies.updateMany({ "name": "Facebook" }, { "$push": { "tag_list": "media" } })
Answer: B
Explanation:
https://docs.mongodb.com/manual/reference/method/db.collection.updateMany/
NEW QUESTION # 146
......
Pass MongoDB C100DEV exam Dumps 100 Pass Guarantee With Latest Demo: https://certtree.2pass4sure.com/MongoDB-Certified-Developer-Associate/C100DEV-actual-exam-braindumps.html