
2024 C100DEV Question Bank: Free PDF Download Recently Updated Questions
C100DEV Certification Exam Dumps with 253 Practice Test Questions
Being MongoDB Certified Developer Associate can provide several benefits, such as boosting a developer's career prospects, demonstrating their knowledge and skills to employers, and increasing their credibility in the industry. It also gives developers access to exclusive resources, such as the MongoDB Certified Developer Portal and a community of certified professionals around the world. Overall, the MongoDB C100DEV Exam is an excellent opportunity for developers to validate their skills and advance their careers.
To prepare for the MongoDB C100DEV exam, candidates can take the MongoDB University's Developer courses, which are available online for free. These courses cover all the topics that are tested in the exam and provide hands-on experience with MongoDB. Additionally, MongoDB offers a practice exam that candidates can take to gauge their readiness for the real exam.
NEW QUESTION # 84
Select all true statements about elections (replica set).
- A. Elections can take place anytime while the primary is available.
- B. Nodes with a higher priority are more likely to be selected as primary node.
- C. Not all nodes have equal chances to become the primary node.
- D. Setting a node's priority to 0 ensures that a node never becomes primary.
Answer: B,C,D
Explanation:
https://docs.mongodb.com/manual/replication/#replication-in-mongodb
NEW QUESTION # 85
You want to execute the following query quite often in your application: db.hotels.aggregate([ { "$match": { "stars": { "$gt": 4.5 } } }, { "$sort": { "stars": 1 } } ]) Your collection doesn't have any additional indexes. Which index should you create to support this query?
- A. db.hotels.createIndex( { "match": 1 } )
- B. db.hotels.createIndex( { "stars": 1 } )
- C. In this case, the index could not be created.
Answer: B
Explanation:
https://docs.mongodb.com/manual/indexes/
NEW QUESTION # 86
Select all true statements regarding to replica sets in MongoDB.
- A. Replica sets use failover to provide high availability to client applications.
- B. We can have up to 50 replica set members, but only 7 of those will be voting members.
- C. Replica set members have a fixed role assigned.
Answer: A,B
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 # 87
Suppose you have a movies collection with the following document structure:
{ _id: ObjectId("573a1390f29313caabcd60e4"), title: 'The Immigrant', fullplot: "Charlie is on his way to the USA.
He wins in a card game, puts the money in Edna's bag (she and her sick mother have been robbed of everything).
When he retrieves a little for himself he is accused of being a thief.
Edna clears his name. Later, broke, Charlie finds a coin and goes into a restaurant." }
You want to perform text search queries on fullplot field.
What do you have to do? Just query the database. For example:
- A. Just query the database. For example: db.movies.find( { $text: { $search: 'spaceship'} } ).explain()
- B. First, create a text index: db.movies.createIndex( { fullplot: 'text' } ) Then query the database: db.movies.find( { $text: { $search: 'spaceship' } } )
- C. First, create an index: db.movies.createIndex( { fullplot: 1 } )Then query the database: db.movies.find( { $text: { $search: 'spaceship' } } )
Answer: B
Explanation:
https://docs.mongodb.com/manual/text-search/ https://docs.mongodb.com/manual/core/index-text/
NEW QUESTION # 88
Given the following MongoDB URI: mongodb+srv://datascientist34:[email protected]/admin Which of the following statements are true? (select 2)
- A. The password used for authentication is ta33w9rd
- B. The password used for authentication is xtr-178
- C. There are 178 nodes in the xtr replica set.
- D. The user datascientist34 is trying to authenticate on database admin.
Answer: A,D
Explanation:
Explanation: https://docs.mongodb.com/manual/reference/connection-string/
NEW QUESTION # 89
You have the following query: db.gamers.find( { "level": { "$gte" : 70 }, "map": "Inferno" } ).sort( { "points": 1, "group": 1 } ) Which of the following indexes best supports this query? Keep in mind the equality, sort, range rule.
- A. { level: 1, map: 1, points: 1, group: 1 }
- B. { points: 1, group: 1, map: 1, level: 1 }
- C. { points: 1, group: 1, level: 1, map: 1 }
- D. { map: 1, points: 1, group: 1, level: 1 }
Answer: D
Explanation:
https://docs.mongodb.com/manual/indexes/
NEW QUESTION # 90
Select true statements about capped collections.
- A. Capped collections are fixed-size collections.
- B. Capped collections guarantee preservation of the insertion order.
- C. Capped collections automatically remove the oldest documents in the collection to make room for new documents.
- D. If the collection is full, the oldest document in the collection is removed when a new document is added to the collection.
Answer: A,B,C,D
Explanation:
https://docs.mongodb.com/manual/core/capped-collections/
NEW QUESTION # 91
Select all true statements regarding to multikey indexes.
- A. An index doesn't become multikey until a document that has an array value is inserted.
- B. Multikey indexes allow us to index on array fields.
- C. Multikey indexes don't support indexes on multiple array fields on single documents.
Answer: A,B,C
Explanation:
https://docs.mongodb.com/manual/core/index-multikey/
NEW QUESTION # 92
Select all true statements about covered queries.
- A. For a covered query, you service the operation entirely from the index, which is usually faster than checking each document.
- B. Covered queries don't use indexes.
- C. All fields used in a query filter must be in the index used by the query.
- D. All fields returned in the result must be in the index used by the query.
Answer: A,C,D
Explanation:
https://docs.mongodb.com/manual/core/query-optimization/#covered-query
NEW QUESTION # 93
Select all true statements about indexes on a field with values of varying data types.
- A. Values are ordered only by data type.
- B. In MongoDB index cannot have different data types.
- C. Values are ordered by data type, then by value.
- D. Values are ordered only by value.
Answer: C
Explanation:
https://docs.mongodb.com/manual/indexes/
NEW QUESTION # 94
Suppose you added the following index to a products collection: { product_category: 1 } Which of the following operations can potentially decrease performance?
- A. db.products.updateOne( { product_category: 'shoes' }, { $set: company: 'Nike' } )
- B. db.products.find( { product_category: 'clothes' } )
- C. db.products.insertOne( { product_category: 'clothes' } )
Answer: A,C
Explanation:
The updateOne and insertOne operations are correct because adding indexes affects write performance.
NEW QUESTION # 95
Select all true statements regarding to scaling.
- A. Scaling horizontally is generally cheaper than scaling vertically.
- B. When scaling horizontally our scaling cost increases linearly.
- C. When scaling vertically our scaling cost increases linearly.
Answer: A,B
Explanation:
https://www.mongodb.com/databases/scaling
NEW QUESTION # 96
You are working in a team on a certain application in the gaming sector. Queries similar to the following are quite often executed by your application. db.gamers.find( { level: 10, is_active: true } ) How can you speed up the execution of similar queries? Choose the best option.
- A. There is no way to speed up this query.
- B. Create the given index:
- C. Create the given index:
- D. db.gamers.createIndex( { level: 1 } )
- E. Create the given index:
- F. db.gamers.createIndex( { is_active: 1 } )
- G. db.gamers.createIndex( { level: 1, is_active: 1 } )
Answer: G
Explanation:
https://docs.mongodb.com/manual/reference/method/db.collection.createIndex/
NEW QUESTION # 97
Which command do you use to display all indexes in routes collection?
- A. db.routes.getIndexes()
- B. db.routes.dropIndex()
- C. db.routes.indexes()
- D. db.routes.dropIndex()
Answer: A
Explanation:
https://docs.mongodb.com/manual/reference/method/db.collection.getIndexes/
NEW QUESTION # 98
Select true statements about the selection of the shard key.
- A. High frequency - most documents fall within a particular range. This can lead to bottleneck problems within the cluster.
- B. High cardinality provides more shard key values, which determines the maximum number of chunks the balancer can create.
- C. Monotonically changing shard keys result in write operations going to a single shard. This is inefficient.
- D. Non-monotonic data is a good choice for shard key.
Answer: A,B,C,D
Explanation:
https://docs.mongodb.com/manual/core/sharding-shard-key/
NEW QUESTION # 99
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": { "country": "USA" } })
- B. db.companies.updateMany({ "name": "Facebook" }, { "$set": { "description": "Social media" } })
- C. db.companies.updateMany({ "name": "Facebook" }, { "$push": { "tag_list": "media" } })
Answer: A
Explanation:
https://docs.mongodb.com/manual/reference/method/db.collection.updateMany/
NEW QUESTION # 100
We have an accounts collection with the following document structure: { _id: ObjectId("5ca4bbc7a2dd94ee5816239d"), account_id: 864905, limit: 10000, products: [ 'Commodity', 'InvestmentStock' ] }, { _id: ObjectId("5ca4bbc7a2dd94ee5816239e"), account_id: 299072, limit: 10000, products: [ 'InvestmentFund', 'InvestmentStock' ] }, { _id: ObjectId("5ca4bbc7a2dd94ee5816239f"), account_id: 137994, limit: 10000, products: [ 'CurrencyService', 'InvestmentStock' ] } We need to use Aggregation Framework to find the distribution of products field. Sort the result set by decreasing total number of products. Expected output: [ { _id: 'InvestmentStock', total: 1746 }, { _id: 'CurrencyService', total: 742 }, { _id: 'Brokerage', total: 741 }, { _id: 'InvestmentFund', total: 728 }, { _id: 'Commodity', total: 720 }, { _id: 'Derivatives', total: 706 } ] Which pipeline should you use?
- A. [{ $unwind: { path: "products" } }, { $group: { _id: "products", total: { $sum: 1 } } }, { $sort: { total: -1 } }]
- B. [{ $unwind: { path: "$products" } }, { $group: { _id: "$products", total: { $sum: 1 } } }, { $sort: { total: -1 } }]
- C. [{ $group: { _id: "$products", total: { $sum: 1 } } }, { $sort: { total: -1 } }]
Answer: B
Explanation:
https://docs.mongodb.com/manual/aggregation/
NEW QUESTION # 101
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 ] } Your application will often query based on the coordinates field. How to create a 2dsphere geospatial index for the coordinates field?
- A. db.shipwrecks.createIndex({'coordinates': 'text'})
- B. db.shipwrecks.createIndex({'coordinates': '2d'})
- C. db.shipwrecks.createIndex({'coordinates': '1'})
- D. db.shipwrecks.createIndex({'coordinates': '2dsphere'})
Answer: D
Explanation:
https://docs.mongodb.com/manual/core/2dsphere/
NEW QUESTION # 102
Select all true statement regarding to the MongoDB (BSON, JSON). (select 3)
- A. MongoDB stores data in JSON, and we can view it in BSON.
- B. MongoDB stores data in BSON, and we can view it in JSON.
- C. BSON supports as many data types as JSON.
- D. BSON is faster to parse and lighter to store than JSON.
- E. BSON supports more data types than JSON.
Answer: B,D,E
Explanation:
https://www.mongodb.com/json-and-bson
NEW QUESTION # 103
How to shutdown the server? (Mongo shell)
- A. db.shutdownServer()
- B. use admin
- C. use admin
- D. db.disconnect()
- E. db.shutdown()
- F. use admin
Answer: A
Explanation:
https://docs.mongodb.com/manual/reference/method/db.shutdownServer/
NEW QUESTION # 104
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 not 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 We also want to sort the result set by decreasing imdb votes and limit the number of documents retuned to 5. Example output: [ { imdb: { votes: 1294646 }, genres: [ 'Action', 'Mystery', 'Sci-Fi' ], title: 'Inception' }, { imdb: { votes: 1109724 }, genres: [ 'Adventure', 'Fantasy' ], title: 'The Lord of the Rings: The Fellowship of the Ring' }, { imdb: { votes: 1081144 }, genres: [ 'Adventure', 'Fantasy' ], title: 'The Lord of the Rings: The Return of the King' }, { imdb: { votes: 1080566 }, genres: [ 'Action', 'Sci-Fi' ], title: 'The Matrix' }, { imdb: { votes: 1004805 }, genres: [ 'Action', 'Thriller' ], title: 'The Dark Knight Rises' } ] Which pipeline should you use?
- A. [{ $match: { genres: { $in: ['Drama'] }, 'imdb.votes': { $gte: 100 } } }, { $project: { _id: 0, title: 1, genres: 1, 'imdb.votes': 1 } }, { $sort: { 'imdb.votes': -1 } }, { $limit: 5 }]
- B. [{ $match: { genres: { $nin: ['Drama'] }, 'imdb.votes': { $gte: 100 } } }, { $project: { _id: 0, title: 1, genres: 1, 'imdb.votes': 1 } }, { $sort: { 'imdb.votes': -1 } }]
- C. [{ $match: { genres: { $nin: ['Drama'] }, 'imdb.votes': { $gte: 100 } } }, { $project: { _id: 0, title: 1, genres: 1, 'imdb.votes': 1 } }, { $sort: { 'imdb.votes': -1 } }, { $limit: 5 }]
Answer: C
Explanation:
https://docs.mongodb.com/manual/aggregation/
NEW QUESTION # 105
What does IOPS stand for in database terminology?
- A. Internet Official Protocol Standards
- B. Input/Output per Second
Answer: B
NEW QUESTION # 106
Select read concern levels that are supported by transactions in MongoDB.
- A. snapshot
- B. majority
- C. local
Answer: A,B,C
Explanation:
https://docs.mongodb.com/manual/core/transactions/#read-concern-write-concern-read-preference
NEW QUESTION # 107
Suppose you are connected to mongod instance that is already running on port 27000 as admin user. You have to create a new user for an application that has the readWrite role. Use the db.createUser() command to create a user for data analysis. The requirements for this user are: -> role: read on esmartdata database -> username: dataScientist -> password: ds123sci456 Which command should you use?
- A. db.createUser({ user: 'dataScientist', pwd: 'ds123sci456', roles: [{role: 'write', db: 'esmartdata'}] })
- B. db.createUser({ user: 'dataScientist', pwd: 'ds123sci456', roles: [{role: 'read', db: ''}] })
- C. db.createUser({ user: 'dataScientist', pwd: 'ds123sci456', roles: [{role: 'read', db: 'esmartdata'}] })
- D. db.createUser({ user: 'dataScientist', pwd: 'ds123sci456', roles: [{role: 'r', db: 'esmartdata'}] })
Answer: C
Explanation:
https://docs.mongodb.com/manual/reference/method/db.createUser/
NEW QUESTION # 108
Suppose you are connected to mongod instance that is already running on port 27000 as admin user. You have to dump reviews collection from the restaurants database to BSON file. Which command should you use?
- A. mongodump --db restaurants --collection reviews
- B. mongodump --db reviews --collection restaurants
- C. mongoexport --db restaurants --collection reviews
Answer: A
Explanation:
https://docs.mongodb.com/database-tools/mongodump/
NEW QUESTION # 109
......
New C100DEV Exam Dumps with High Passing Rate: https://actualtests.real4prep.com/C100DEV-exam.html