Halloween Sale Limited Time 70% Discount Offer Use coupon code below to save on all exam bundles!
Code: Hall70
Ends in: 0d 00h 00m 00s

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.

Questions 4

When should we consider representing a one-to-many relationship in an embedded collection instead of separate collection?

Options:

A.

When the many is not very large

B.

When the many is very large

C.

Always

D.

Never

Buy Now
Questions 5

We can insert multiple documents in bulk using which of the following operations:

Options:

A.

initializeUnorderedBulk

B.

initializeUnorderedBulkOp

C.

initializeBulk

D.

initializeBulkOp

Buy Now
Questions 6

Which of the following about Capped Collections is correct?

Options:

A.

Fixed Size

B.

Only " Fixed Size " and " High-throughput operations that insert and retrieve documents based on insertion order "

C.

High-throughput operations that insert and retrieve documents based on insertion order

D.

If the allocated space for a capped collection exceeds, it stops inserting new documents

Buy Now
Questions 7

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

}

Options:

A.

The number of closed connections in the server ' s history.

B.

The number of connections since the server was set up.

C.

The total number of database connections at the moment.

D.

The number of connections since the server was started.

Buy Now
Questions 8

What does the following $slice query return using the following command? db.posts.find( {}, { comments: { $slice: [ -10, 5 ] } } )

Options:

A.

Returns 5 comments, beginning with the last 10 items

B.

Returns 10 comments, beginning with the last

C.

Returns 10 comments, beginning with the first

D.

Returns 5 comments, beginning with the first 10 items

Buy Now
Questions 9

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?

Options:

A.

secondaryPreferred

B.

Secondary

C.

nearest

D.

primary

E.

primaryPreferred

Buy Now
Questions 10

What command lists all indexes for a collection?

Options:

A.

db.collection.info()

B.

db.collection.indexStats()

C.

db.collection.findIndexes()

D.

db.collection.getIndexes()

Buy Now
Questions 11

Which of the following is supported by MongoDB?

Options:

A.

Transaction Management

B.

ACID Transactions

C.

Journaling

D.

Relationships between Collections (Primary Key Foreign Key)

Buy Now
Questions 12

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?

C100DBA Question 12

Options:

A.

db.posts.createIndex({commerits.$.author " :-l});

B.

db.posts.createIndex({comments.$.author " : {$desc:l > });

C.

db.posts.createIndex({comments.author " :-l});

Buy Now
Questions 13

What method should be used to configure dynamically runtime parameters for the mongod process in MongoDB?

Options:

A.

Use the --setParameter flag with the mongod command.

B.

Use the --config flag to specify a configuration file at startup of mongod.

C.

Configure the parameters in the MongoDB URI string.

D.

Configure in the MongoDB client shell mongosh before starting the server.

Buy Now
Questions 14

Which option should be used to update all the documents with the specified condition in the MongoDB query?

Options:

A.

specify {all: true} as the third parameter of update command

B.

updateAII instead of update

C.

specify {updateAII: true} as the third parameter of update command

D.

specify {multi : true} as the third parameter of update command

Buy Now
Questions 15

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 " ?

Options:

A.

db.products.update({ " color " : " green " }, { " price " : { " $inc " : 5 } })

B.

db.products.update({ " color " : " green " }, { $inc: { " price " : 5 } })

C.

db.products.updateMany({ " color " : " green " }, { " $inc " : { " price " : 5 } })

D.

db.products.updateMany({ " color " : " green " }, { " price " : { " $inc " : 5 } })

Buy Now
Questions 16

What is one purpose of a hidden index?

Options:

A.

To remove it from $indexStats aggregation stage.

B.

To reduce the cost of a collection scan.

C.

To test the impact of deleting the index without actually deleting it.

D.

To hide associated documents in the collection.

Buy Now
Questions 17

What is the output of the following program?

Options:

A.

60 s

B.

1s

C.

100 s

D.

100 ms

Buy Now
Questions 18

What command is used to grant a role " customRole1 " to an existing user called " user1 " ?

Options:

A.

db.grantRoles( " user1 " , [ " customRole1 " ])

B.

db.createUser({ user: " user1 " , pwd: " pwd1 " , roles: [{ role: " customRole1 " , db: " admin " }] })

C.

db.addRoleToUser( " user1 " , [ " customRole1 " ])

D.

db.grantRolesToUser( " user1 " , [ " customRole1 " ])

Buy Now
Questions 19

Which of the following aggregation commands in MongoDB does not support sharded collections?

Options:

A.

mapReduce

B.

group

C.

aggregate

D.

All of the above

Buy Now
Questions 20

What command adds a document to the class101 collection where the student is " Randall " and the student passed the class?

Options:

A.

db.class101.insertOne({ student: " Randall " , passed: True })

B.

db.class101.insertOne({ student: Randall, passed: true })

C.

db.class101.insertOne({ student: Randall, passed: True })

D.

db.class101.insertOne({ student: " Randall " , passed: true })

Buy Now
Questions 21

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 ] >

Options:

A.

db.c.find( { > , { b : { $slice : [ 0 , 5 ] } } )

B.

db.c.find( { b : [ 0 , 5 ] > )

C.

db.c.find( { > , { b : { $substr[ 0 , 5 ] > > )

D.

db.c.find( { > , { b : [ 0, 1, 2, 3, 4, 5 ] > )

E.

db.c.find( { > , { b : [ 0 , 5 ] > )

Buy Now
Questions 22

What is the first task that a secondary would perform on being prompted by another secondary for an election?

Options:

A.

Start the election process for primary

B.

Vote for the first secondary so that it would become the next primary

C.

Vote for itself and then call for election

D.

Connect to primary to confirm its availability

Buy Now
Questions 23

Suposse tou have the following collection with only 2 documents:

C100DBA Question 23

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?

Options:

A.

3

B.

5

C.

4

D.

2

E.

1

Buy Now
Questions 24

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?

Options:

A.

db.population.aggregate( [{ $group: { _id: { state: " $state " , city: " $city " },pop: { $pop: 1 } } }] )

B.

db.population.aggregate( [{ $group: { _id: { city: " $city " },pop: { $sum: " $pop " } } }] )Multi Document Transaction is not supported by MongoDB

C.

db.population.aggregate( [{ $group: { _id: { state: Estate " , city: " $city " },pop: { $sum: " $pop " } } }] )

D.

db.population.aggregate( [{ $group: { _id: { state: Estate " , city: " $city " },pop: { $sum: 1 > > > ] )

Buy Now
Questions 25

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?

Options:

A.

7

B.

2

C.

1

D.

0

Buy Now
Questions 26

Consider that our posts collection contains an array field called tags that contains tags that the user enters. {

C100DBA Question 26

Which of the following commands will find all the posts that have been tagged as tutorial.

Options:

A.

db.posts.find( { tags : [ " tutorial " ] } );

B.

db.posts.find( { $array : {tags: " tutorial " ) > );

C.

db.posts.find( { tags : " tutorial " } );

D.

db.posts.findInArray( { tags : " tutorial " > );

Buy Now
Questions 27

Which TWO mongosh commands can be used to shutdown the mongod daemon?

Options:

A.

db.adminCommand({ " shutdown " : 1 })

B.

use admindb.adminCommand({ " killOp " : 1, " op " : 27017 })

C.

use admindb.runCommand({ killAllSessions: [ { user: " * " , db: " * " } ] })

D.

use admindb.shutdownServer()

Buy Now
Questions 28

Which of the following is a valid insert statement in mongodb? Select all valid.

Options:

A.

db.test.push({x:2,y: " apple " })

B.

db.test.insert« " x " :2, " y " : " apple " })

C.

db.test.insert({x:2,y: " apple " })

D.

db.test.insert({x:2},{y: " apple " })

Buy Now
Questions 29

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.

Options:

A.

As an optimized sort query (scanAndOrder = false) using " mylndex " because we are sorting on an indexed field

B.

As an indexed query using " mylndex " because field " user.login " is indexed

C.

MongoDB will need to do a table/collection scan to find matching documents

D.

None of the above

E.

As a covered query using " mylndex " because we are filtering out " _id " and only returning " user.login "

Buy Now
Questions 30

Which of the following are common uses of the mongo shell? Check all that apply

Options:

A.

Perform queries against MongoDB collections

B.

Perform administrative tasks

C.

Use as a JavaScript framework for your production system

Buy Now
Questions 31

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 " } } )

Options:

A.

{ _id : 3, quote : " Nobody will ever catch me. " }

B.

{ _id : 1, quote : " That ' s a fact, Jack. " }

C.

{ _id : 2, quote : " Find out if that fact is correct. " }

Buy Now
Questions 32

Consider the following document from the products collection:

C100DBA Question 32

What does the following query using $elemMatch return? db.products.find( { product_code: " 345678 " }, { variations: { $elemMatch: { size: ^L^ } } } )

Options:

A.

Returns the complete document but retrieves only the size field from the array

B.

Returns the document but with only one element in the variations array (corresponding to size L)

C.

Returns the complete document since MongoDB does not support partial array retrieval

D.

Returns the complete document but retrieves only the size field from the array and also with only one element in the variations array (corresponding to size L)

Buy Now
Questions 33

‘$set ' sets the value of

Options:

A.

Code block

B.

Name/value pair

C.

Key

D.

None of the above

Buy Now
Questions 34

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 > > ] > )

Options:

A.

{ ' ' __id " :3, " a " : 4, " c " :0, " b " :14}

B.

{ ' ' _Jd " :7, " a " : 8, " c " :1, " b " :7}

C.

{ " .Jd " :6, " a " : 1, " c " :1, " b " :5}

D.

{ ' ' \Jd " :9, " a " : 17, " c " : 1, " b " : 1}

E.

{ \Jd " :10, " a " : 3, " c " : 1, " b " : 1}

F.

{ " .Jd " :: 2, " a " : 2, " c " :: 0, " b " : 1}

G.

{ " .Jd " :: 4, " a " : 5, " c " :: 0, " b " : 17}

Buy Now
Questions 35

What " stage " indicates that no indexes were available for a query pattern?

Options:

A.

FETCH

B.

IXSCAN

C.

COLLSCAN

D.

GROUP

Buy Now
Questions 36

What mongosh command connects to node-1.cluster1.mycompany.local on port 27017?

Options:

A.

mongosh --hostname " node-1.cluster1.mycompany.local:27017 "

B.

mongosh --connect " node-1.cluster1.mycompany.local:27017 "

C.

mongosh " node-1.cluster1.mycompany.local & port=27017 "

D.

mongosh " node-1.cluster1.mycompany.local:27017 "

Buy Now
Questions 37

Which of the following is true about aggregation framework?

Options:

A.

Each aggregation operator need to return atleast one of more documents as a result

B.

the aggregate command operates on a multiple collection

C.

A single aggregation framework operator can be used more than once in a query

D.

Pipeline expressions are stateless except accumulator expressions used with $group operator

Buy Now
Questions 38

What command is used to check the value that " logLevel " is set to?

Options:

A.

db.runCommand({ getParameter: 1, " logLevel " : 1 })

B.

db.getParameter( " logLevel " )

C.

db.getParameter({ " logLevel " : 1})

D.

db.adminCommand({ getParameter: 1, " logLevel " : 1 })

Buy Now
Questions 39

In a replica set, a_________number of members ensures that the replica set is always able to select a primary.

Options:

A.

Even

B.

Odd

C.

2

D.

Depends on the application architecture

Buy Now
Questions 40

You are comparing values of different BSON types in mongodb. You want to compare from lowest to highest. Which comparison order is used?

Options:

A.

MinKey, Null, Numbers,Symbol, String,Object,Array,BinData

B.

MinKey, Null, Numbers,Object,Array,BinData,Symbol, String

C.

Object/Array^inData/Symbol,MinKey, Null, Numbers,String

D.

Objec^Array^inData,Symbol, String,MinKey, Null, Numbers

Buy Now
Questions 41

In order to ensure that you can maintain high availability in the face of server failure, you should implement which of the following?

Options:

A.

Sharding

B.

Properly defined user roles

C.

Replication

D.

Put indexes on all of your documents

E.

The proper storage engine

Buy Now
Questions 42

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.

Options:

A.

db.toys.find( { name : " Big Rig Truck " , date : " 2013-02-01 " , manufacturer : " Tanko "

B.

db.toys.find( { manufacturer : " Matteo " , name : " Barbara " , date : " 2014-07-02 " } )

C.

db.toys.find( { date : " 2015-03-01 " , manufacturer : " Loggo " , name : " Brick Set " } )

Buy Now
Questions 43

In which of the following scenarios is sharding not the correct option. Select all that apply.

Options:

A.

The write operations on the collection are low

B.

The write operations on the collection are very high

C.

The working set in the collection is expected to grow very large in size

D.

The collection is a read intensive collection with less working set

Buy Now
Questions 44

Which is the correct order (lowest to highest) in which MongoDB compares the BSON types?

Options:

A.

Number, Null, String and Object

B.

Null, Number, Object and String

C.

Null, Number, String and Object

D.

String, Null, Number and Object

Buy Now
Questions 45

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?

Options:

A.

A, B, C

B.

A

C.

B, C

D.

A, B

Buy Now
Questions 46

' mongoimport ' command is used for

Options:

A.

Batch data insertion

B.

None of the above

C.

Multiple command import

D.

Multiple command insertion

Buy Now
Questions 47

A MongoDB administrator needs to create a new role with only the read privileges for the products database.

What command should the administrator use?

Options:

A.

db.createRole({ role: " productRead " , privileges: [ { resource: { db: " products " , collection: " * " }, actions: [ " readAnyDatabase " ] } ] , roles: [] }, { w: " majority " , wtimeout: 5000 })

B.

db.createRole({ role: " productRead " , privileges: [ { resource: { db: " products " , collection: " " }, actions: [ " find " ] } ] , roles: [] }, { w: " majority " , wtimeout: 5000 })

C.

db.createRole({ role: " productRead " , privileges: [ { resource: { db: " products " , collection: " * " }, actions: [ " readWrite " ] } ] , roles: [] }, { w: " majority " , wtimeout: 5000 })

D.

db.createRole({ role: " productRead " , privileges: [ { resource: { db: " products " , collection: " * " }, actions: [ " read " ] } ] , roles: [] }, { w: " majority " , wtimeout: 5000 })

Buy Now
Questions 48

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?

Options:

A.

db.population.aggregate( [{ $group: { _id: { state: " $state " , city; " $city " },pop: { $sum: 1 > > > ] )

B.

db.population.aggregate( [{ $group: { _id: { state: Estate " , city: " $city " },pop: { $pop: 1 } } }] )

C.

db.population.aggregate( [{ $group: { _id: { state: Estate " , city: n$city " },pop: { $sum: " $pop " } } }] )

D.

db.population.aggregate( [{ $group: { _id: { city: " $city " },pop: { $sum: " $pop " } } }] )Multi Document Transaction is not supported by MongoDB

Buy Now
Questions 49

Which operations add new documents to a collection?

Options:

A.

Create

B.

update

C.

insert

D.

delete

Buy Now
Questions 50

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 " }

Options:

A.

db.users.replaceOne({ userid: 1 }, { first: " John " , roles: " SuperUser " })

B.

db.users.replaceOne({ userid: 1 }, { userid: 1, first: " John " , roles: " SuperUser " })

C.

db.users.replaceOne({ userid: 1 }, { roles: " SuperUser " })

D.

db.users.replaceOne({ userid: 1 }, { $set: { roles: " SuperUser " } })

Buy Now
Questions 51

Which of the following does MongoDB use to provide High Scalability?

Options:

A.

Replication

B.

Write Concern

C.

Indexing

D.

Sharding

Buy Now
Exam Code: C100DBA
Exam Name: MongoDB Associate Database Administrator(Based on MongoDB 6.0 and 7.0+)
Last Update: Oct 27, 2026
Questions: 172

PDF + Testing Engine

$55.71   $185.69

Testing Engine

$42.85   $142.83

PDF (Q&A)

$47.13   $157.11