Free Practice Questions for the MongoDB Certified DBA Associate C100DBA Exam (2026 Updated)
At Marks4sure, we are dedicated to providing IT professionals with the most accurate and reliable preparation materials for the MongoDB C100DBA exam. To support your certification journey, we have made a selection of our premium 2026 MongoDB Certified DBA Associate practice questions and answers available completely free. You can take this practice test as many times as you need. Every question includes a detailed, expertly verified explanation to ensure you fully grasp the core security concepts before test day.
When should we consider representing a one-to-many relationship in an embedded collection instead of separate collection?
We can insert multiple documents in bulk using which of the following operations:
What does the totalCreated field mean in the output of the db.serverStatus().connections command?
> db.serverStatus().connections
{
" current " : 4,
" available " : 51196,
" totalCreated " : 5,
" active " : 2,
" threaded " : 4,
" exhaustIsMaster " : 1,
" exhaustHello " : 0,
" awaitingTopologyChanges " : 1
}
What does the following $slice query return using the following command? db.posts.find( {}, { comments: { $slice: [ -10, 5 ] } } )
What read preference should your application use if you want to read from the primary under normal circumstances but allow reads from secondaries when a primary is unavailable?
Given a collection posts as shown below having a document array comments, which of the following command will create an index on the comment author descending?
What method should be used to configure dynamically runtime parameters for the mongod process in MongoDB?
Which option should be used to update all the documents with the specified condition in the MongoDB query?
Consider a products collection:
{ " _id " : 1, " item " : " t-shirt " , " color " : " red " , " price " : 10 }
{ " _id " : 2, " item " : " sweater " , " color " : " green " , " price " : 20 }
{ " _id " : 3, " item " : " belt " , " color " : " black " , " price " : 15 }
{ " _id " : 4, " item " : " hat " , " color " : " green " , " price " : 12 }
What operation modifies the price of all products that have a color value of " green " ?
What command is used to grant a role " customRole1 " to an existing user called " user1 " ?
Which of the following aggregation commands in MongoDB does not support sharded collections?
What command adds a document to the class101 collection where the student is " Randall " and the student passed the class?
Consider the following document:
> db.c.find()
{ " _id " : 12, b : [ 3, 5, 7, 2, 1, -4, 3, 12 ] }
Which of the following queries on the " c " collection will return only the first five elements of the array in the " b "
field? E.g.,
Document you want returned by your query:
{ " _id " : 12, " b " : [ 3, 5, 7, 2, 1 ] >
What is the first task that a secondary would perform on being prompted by another secondary for an election?
Suposse tou have the following collection with only 2 documents:
If you run an aggregation query and use { $unwind: " $traits " } as the first stage, how many documents will be passed to the next stage of the aggregation pipeline?
Consider that you have a collection called population which has fields state and city. Which of the following query will calculate the population grouped by state and city?
In a sharded replica set environment, the w Option provides ability for write concern and j Option provides ability for the data to be written on disk journal. Consider that we have a seven member replica set and we want to assure that the writes are committed to journal. What should be the value of j?
Consider that our posts collection contains an array field called tags that contains tags that the user enters. {
Which of the following commands will find all the posts that have been tagged as tutorial.
Which of the following is a valid insert statement in mongodb? Select all valid.
Consider the following example document:
{
" _id " : Objectld( " 5360c0a0a655a60674680bbe " ),
" user "
" login " : " irOn "
" description " : " Made of steel "
" date " : ISODate( " 2014-04-30T09:16:45.836Z " ),
}
>
and index creation command:
db.users.createlndex( { " user.login " : 1, " user.date " : -1 }, " mylndex " )
When performing the following query:
db.users.find( { " user.login " : /Air.*/ },
{ " user " :1, " _id " :0 > ).sort( { " user.date " :1 > )
which of the following statements correctly describe how MongoDB will handle the query? Check all that apply.
Which of the following are common uses of the mongo shell? Check all that apply
You perform the following query on the sayings collection, which has the index
{ quote : " text " }:
Assuming the documents below are in the collection, which ones will the following query return? Check all that
apply.
db.sayings.find( { $text : { $search : " fact find " } } )
Consider the following document from the products collection:
What does the following query using $elemMatch return? db.products.find( { product_code: " 345678 " }, { variations: { $elemMatch: { size: ^L^ } } } )
Which of the documents below will be retrieved by the following query? Assume the documents are stored in a collection called " sample " . Check all that apply.
db.sample.find( { " $or " : [ { " a " : { " $in " : [ 3, 10] > }, { " b " : { " $lt " : 2 > > ] > )
What mongosh command connects to node-1.cluster1.mycompany.local on port 27017?
In a replica set, a_________number of members ensures that the replica set is always able to select a primary.
You are comparing values of different BSON types in mongodb. You want to compare from lowest to highest. Which comparison order is used?
In order to ensure that you can maintain high availability in the face of server failure, you should implement which of the following?
You have the following index on the toys collection:
{
" manufacturer " : 1,
" name " : 1,
" date " : -1
}
Which of the following is able to use the index for the query? Check all that apply.
In which of the following scenarios is sharding not the correct option. Select all that apply.
Which is the correct order (lowest to highest) in which MongoDB compares the BSON types?
If you have created a compound index on (A,B, C) which of the following access pattern will not be able to utilize the index?
A MongoDB administrator needs to create a new role with only the read privileges for the products database.
What command should the administrator use?
Consider that you have a collection called population which has fields state and city. Which of the following query will calculate the population grouped by state and city?
Given the following MongoDB document in the users collection:
{ " userid " : 1, " first " : " John " , " roles " : " Basic " }
Which statement results in this document?
{ " userid " : 1, " first " : " John " , " roles " : " SuperUser " }