Black Friday Doorbuster Deal - Flat 75% Off - Ends in 0d 00h 00m 00s - Coupon code: 75brite

ExamsBrite Dumps

MongoDB Associate Database Administrator(Based on MongoDB 6.0 and 7.0+) Question and Answers

MongoDB Associate Database Administrator(Based on MongoDB 6.0 and 7.0+)

Last Update Nov 23, 2026
Total Questions : 172

We are offering FREE C100DBA MongoDB exam questions. All you do is to just go and sign up. Give your details, prepare C100DBA free exam questions and then go for complete pool of MongoDB Associate Database Administrator(Based on MongoDB 6.0 and 7.0+) test questions that will help you more.

C100DBA pdf

C100DBA PDF

$27.5  $109.99
C100DBA Engine

C100DBA Testing Engine

$32.5  $129.99
C100DBA PDF + Engine

C100DBA PDF + Testing Engine

$42.5  $169.99
Questions 1

Which of the following is true about sharding?

Options:

A.  

Creating a sharded key automatically creates an index on the collection using that key

B.  

We cannot change a shard key directly/automatically once it is set up

C.  

A sharded environment does not support sorting functionality since the documents lie on various mongod instances

D.  

Sharding is enabled at the database level

Discussion 0
Questions 2

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.

Discussion 0
Questions 3

Which of the following is incorrect statement about find and findOne operations in MongoDB?

Options:

A.  

findQ returns all the documents in a collection while findOne() retrieves only the first one.

B.  

find.limit(l) is not the same query as findOne()

C.  

findOneQ returns the actual first document retrieved from a collection

D.  

findQ and findOneQ returns cursors to the collection documents

Discussion 0
Questions 4

Consider the following posts document:

Which of the following queries will return the documents but with only the first two tags in the tags array?

Options:

A.  

db.posts.find({author: " Tom " ».limit({tags:2})

B.  

db.posts.find({author: " Tom " ».limit($slice:{tags:2 > )

C.  

Both " db.posts.find({author: " Tom " },{tags:{$slice:2}}) " and " db.posts.find({author: " Tom " }).limit($slice: {tags:2}) " are valid. $slice works both with projection and limit.

D.  

db.posts.find({author: " Tom " > ,{tags:{$slice:2»)

Discussion 0
Questions 5

Which TWO indicators should an administrator keep an eye on to determine if the storage capacity is nearing its limit?

Options:

A.  

The execution time of the same query increases over time.

B.  

Disk space utilization on the server is consistently above 90%.

C.  

The number of documents in the database is increasing.

D.  

Message errno:28 No space left on device is present in the log file.

E.  

The number of available read or write tickets is consistently low.

Discussion 0
Questions 6

Given a replica set with five data-bearing members, suppose the primary goes down with operations in its oplog that have been copied from the primary to only one secondary. Assuming no other problems occur, which of the following describes what is most likely to happen?

Options:

A.  

missing operations will need to be manually re-performed

B.  

the secondary with the most current oplog will be elected primary

C.  

reads will be stale until the primary comes back up

D.  

the primary may roll back the operations once it recovers

E.  

the most current secondary will roll back the operations following the election

Discussion 0
Questions 7

What is the replication factor for a replicated cluster with 1 primary, 3 secondaries with one of them hidden. The set also has an arbiter?

Options:

A.  

None of the above

B.  

5

C.  

3

D.  

4

Discussion 0
Questions 8

What is the equivalent command in MongoDB for the following SQL query?

SELECT * FROM posts WHERE author like " %john% "

Options:

A.  

db.posts.find( { author: /John/ } )

B.  

db.posts.find( { author: /AjohnA/ > )

C.  

db.posts.find( { $like: {author: /John/} } )

D.  

db.posts.find( { author: {$like: /John/} } )

Discussion 0
Questions 9

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}

Discussion 0
Questions 10

In mongodb how do you update a document partially?

Options:

A.  

$project

B.  

$update

C.  

$modify

D.  

$set

Discussion 0
Questions 11

What tool should be used to access and administer a MongoDB cluster?

Options:

A.  

mongosh

B.  

mongod

C.  

mongostat

D.  

mongotop

Discussion 0
Questions 12

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

Discussion 0
Questions 13

Which operations add new documents to a collection?

Options:

A.  

Create

B.  

update

C.  

insert

D.  

delete

Discussion 0
Questions 14

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

Discussion 0
Questions 15

Which of the following operators is used to updated a document partially?

Options:

A.  

$set

B.  

$update

C.  

$project

D.  

$modify

Discussion 0
Questions 16

Consider an orders collection that contains these documents:

{ _id: 1, product: " X-pad " , quantity: 950 }

{ _id: 2, product: " X-pad-pro " , quantity: 1000 }

{ _id: 3, product: " X-phone " , quantity: 850 }

{ _id: 4, product: " X-phone-pro " , quantity: 1350 }

Commands A and B are run at the same time. Assume that no other operations are running.

Options:

A.  

)db.orders.findAndModify({query: { " product " : " X-phone " },update: { $set: { " quantity " : 1250 } }})

B.  

)db.orders.updateMany({}, { $set: { " quantity " : 0 } })What is the possible findAndModify output and database state after these operations complete? Select TWO.

C.  

findAndModify output shows quantity 1250; final X-phone quantity is 1250 while all others are 0.

D.  

findAndModify output shows quantity 850; final quantities for all four documents are 0.

E.  

findAndModify output shows quantity 0; final quantities for all four documents are 0.

F.  

findAndModify output shows quantity 0; final X-phone quantity is 1250 while all others are 0.

Discussion 0
Questions 17

What attribute of the oplog ensures consistency in a replicated dataset?

Options:

A.  

Natural Ordering

B.  

Concurrency Control

C.  

Flow Control

D.  

Idempotent

Discussion 0
Questions 18

You have designed a web application with mongoDB. You have configured replication. The replica set is in place and function properly. What happens in case of failure?

Options:

A.  

Switchover needs to be done manually

B.  

Failover happens automatically

C.  

Switchover happens automatically

D.  

Failover needs to be done manually

Discussion 0
Questions 19

Consider a contacts collection that contains these documents:

{ " _id " : 1, " name " : " Poppy " , " birthday " : " 03-09-1984 " }

{ " _id " : 2, " name " : " Ashley " , " birthday " : " 08-12-1990 " }

{ " _id " : 3, " name " : " Cleo " , " birthday " : " 11-02-1976 " }

What query returns the document where the field name is " Poppy " ?

Options:

A.  

db.contacts.find({ " name.Poppy " : 1 })

B.  

db.contacts.find({ " name " : " poppy " })

C.  

db.contacts.find({ " Poppy " : 1 })

D.  

db.contacts.find({ " name " : " Poppy " })

Discussion 0
Questions 20

What is the output of following two commands in MongoDB: db. posts. insert({n_id " :l}) db.posts.insert({ " _id " :l})

Options:

A.  

Two documents will be inserted with _id as 1

B.  

MongoDB will automatically increment the _id of the second document as 2

C.  

This will throw a duplicate key error

D.  

It will insert two documents and throw a warning to the user

Discussion 0
Questions 21

The MongoDB explain() method does not support which of the following verbosity mode:

Options:

A.  

executionStats

B.  

queryPlanner

C.  

customExecutionStats

D.  

allPlansExecution

Discussion 0
Questions 22

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?

Options:

A.  

3

B.  

5

C.  

4

D.  

2

E.  

1

Discussion 0
Questions 23

What command returns all documents in an orders collection where quantity is less than or equal to 1000 and salesRep is not equal to " Anne " ?

Options:

A.  

db.orders.find({ " quantity " : { $lte: 1000 }, salesRep: { $neq: " Anne " } })

B.  

db.orders.find({ " quantity " : { $lt: 1000 }, salesRep: { $ne: " Anne " } })

C.  

db.orders.find({ " quantity " : { $lte: 1000 }, salesRep: { $ne: " Anne " } })

D.  

db.orders.find({ " quantity " : { $lt: 1000 }, salesRep: { $neq: " Anne " } })

Discussion 0
Questions 24

Which of the following collections stores authentication credentials in MongoDB?

Options:

A.  

test.users

B.  

local.users

C.  

system.users

D.  

users.users

Discussion 0
Questions 25

Which of the tags in a replica set configuration specify the operations to be read from the node with the least network latency?

Options:

A.  

netLatency

B.  

secondaryPreferred

C.  

nearest

D.  

primaryPreferred

Discussion 0
Questions 26

What tool do you use if you want to extract a CSV from mongo?

Options:

Discussion 0
Questions 27

A collection and a document in MongoDB is equivalent to which of the SQL concepts respectively?

Options:

A.  

Column and Row

B.  

Table and Row

C.  

Database and Table

D.  

Table and Column

Discussion 0
Questions 28

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

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)

Discussion 0
Questions 29

What is the maximum size of Index Key Limit and Number of Indexes per collection?

Options:

A.  

1024 bytes and 64 indexes

B.  

12 mega bytes and 64 indexes

C.  

64 bytes and 1024 indexes

D.  

1024 bytes and unlimited indexes

Discussion 0
Questions 30

You perform the following operation in the shell: db.foo.insert( { } ); What gets inserted?

Options:

A.  

A document will be inserted with the same _id as the last document inserted

B.  

A document that matches the collection ' s existing schema, but with null fields

C.  

A document with an _id assigned to be an Objectld

D.  

An empty document

E.  

No document will be inserted; an error will be raised

Discussion 0
Questions 31

Consider an inventory collection that contains these documents:

{ " _id " : 1, " product " : " x-small box " , " colors " : [ " brown " , " black " , " white " ], " qty " : 50 }

{ " _id " : 2, " product " : " small box " , " colors " : [ " brown " , " white " ], " qty " : 60 }

{ " _id " : 3, " product " : " medium box " , " colors " : [ " black " , " grey " , " white " ], " qty " : 45 }

{ " _id " : 4, " product " : " large box " , " colors " : [ " grey " ], " qty " : 50 }

{ " _id " : 5, " product " : " x-large box " , " colors " : [ " grey " , " white " ], " qty " : 10 }

What result set does the following query return?

db.inventory.find({

$or: [

{ " product " : " x-small box " },

{

$and: [

{ " qty " : { $ne: 50 } },

{ " colors " : { $nin: [ " brown " ] } }

]

}

]

})

Options:

A.  

Documents _id:3 and _id:5.

B.  

Documents _id:1 and _id:3.

C.  

Documents _id:1, _id:2, _id:3, and _id:5.

D.  

Documents _id:1, _id:3, and _id:5.

Discussion 0
Questions 32

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

Discussion 0
Questions 33

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

Discussion 0
Questions 34

Which node in a replica set does accept write operation?

Options:

A.  

arbiter

B.  

hidden

C.  

primary

D.  

secondary

Discussion 0
Questions 35

What does the following aggregate query perform?

Options:

A.  

Fetches the posts with likes between 100 and 200 and sets their _id as null

B.  

Groups the posts by number of likes (101, 102, 103.) by adding 1 every time

C.  

Calculates the number of posts with likes between 100 and 200

D.  

Fetches the posts with likes between 100 and 200, sets the _id of the first document as null and then increments it 1 every time

Discussion 0
Questions 36

What operation updates the value of the unitsInStock field to 25 for a document with a " laptop " product, and inserts a new document if it does not exist?

Options:

A.  

db.inventory.updateOne({ product: " laptop " }, { $set: { unitsInStock: 25 } }, { upsert: true })

B.  

db.inventory.insertOne({ product: " laptop " }, { $set: { unitsInStock: 25 } }, { upsert: true })

C.  

db.inventory.insertOne({ product: " laptop " }, { $set: { unitsInStock: 25 } }, { upsert: True })

D.  

db.inventory.updateOne({ product: " laptop " }, { $set: { unitsInStock: 25 } }, { upsert: True })

Discussion 0
Questions 37

A collection named scores includes:

[

{ _id: 1, home_score: 6, away_score: [ 5, 7 ] },

{ _id: 2, home_score: [ 8, 6 ], away_score: 9 },

{ _id: 3, home_score: [ 5, 8 ], away_score: [ 9, 6 ] },

{ _id: 4, home_score: 5, away_score: 10 }

]

Given the following index:

db.scores.createIndex( { home_score: 1, away_score: 1 } )

What document will cause the index to fail?

Options:

A.  

Document with _id: 2

B.  

Document with _id: 4

C.  

Document with _id: 1

D.  

Document with _id: 3

Discussion 0
Questions 38

Write the command(s) are correct to enable sharding on a database " testdb " and shard a collection " testCollection " with _id as shard key.

Options:

Discussion 0
Questions 39

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

Options:

A.  

initializeUnorderedBulk

B.  

initializeUnorderedBulkOp

C.  

initializeBulk

D.  

initializeBulkOp

Discussion 0
Questions 40

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.

Discussion 0
Questions 41

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

Discussion 0
Questions 42

What are TWO functions of sharding?

Options:

A.  

Supporting deployments that distribute data across different geographical zones.

B.  

Supporting deployments that require strong consistency across geographical zones.

C.  

Supporting deployments with very large data sets and high throughput operations.

D.  

Supporting deployments where datasets fit into RAM and performance needs are met.

E.  

Supporting deployments that require redundancy and increased data availability.

Discussion 0
Questions 43

What command set removes node-1.cluster1.mycompany.local:27017 and node-2.cluster1.mycompany.local:27017 from the replica set, then adds node-1.cluster1.mycompany.local:27017 back to the replica set?

Options:

A.  

rs.removeNode( " node-1.cluster1.mycompany.local:27017 " )rs.removeNode( " node-2.cluster1.mycompany.local:27017 " )rs.add({ host: " node-1.cluster1.mycompany.local:27017 " })

B.  

rs.removeNode( " node-1.cluster1.mycompany.local:27017 " )rs.removeNode( " node-2.cluster1.mycompany.local:27017 " )rs.addNode({ host: " node-1.cluster1.mycompany.local:27017 " })

C.  

rs.remove( " node-1.cluster1.mycompany.local:27017 " )rs.remove( " node-2.cluster1.mycompany.local:27017 " )rs.add({ host: " node-1.cluster1.mycompany.local:27017 " })

D.  

rs.remove( " node-1.cluster1.mycompany.local:27017 " )rs.remove( " node-2.cluster1.mycompany.local:27017 " )rs.addNode({ host: " node-1.cluster1.mycompany.local:27017 " })

Discussion 0
Questions 44

Which TWO commands can be used to check for all active operations on the current node?

Options:

A.  

db.currentOp({ op : " command " })

B.  

db.adminCommand({ " all " : currentOp})

C.  

db.currentOp(true)

D.  

db.adminCommand({ currentOp : true })

E.  

db.currentOp({ " all " : true })

Discussion 0
Questions 45

Which of the following operator can be used to control the number of items of an array that a query returns?

Options:

A.  

$ elemMatch

B.  

$slice

C.  

$

D.  

MongoDB does not support partial retrieval of items from an array

Discussion 0
Questions 46

What does the output x of the following MongoDB aggregation query result into; db.posts.aggregate( [ { $group: { _id; " $author " , x: { $sum: $likes } } } ] )

Options:

A.  

Average of likes on all the posts of an author, grouped by author

B.  

Number of posts by an author

C.  

Sum of likes on all the posts by all the authors

D.  

Sum of likes on all the posts by an author, grouped by author

Discussion 0
Questions 47

Consider the following example document from the sample collection. All documents in this collection have the same schema.

Which of the following queries will replace this with the document.

Options:

A.  

db.sample.update( { " _id " : 3 } , { " $set " : { " _id " : 7 , " c " : 4 > > )

B.  

db.sample.update( { " _id " : 3 > , { " _id " : 7 , " c " : 4 > , { " justOne " : true > ) / □ This operation cannot be done with a single query.

C.  

db.sample.update( { " _id " : 3 > , { " _id " : 7 , " c " : 4 , { " $unset " : [ " a " , " b " ] } } )

D.  

db.sample.update( { " _id " : 3 > , { " _id " : 7 , " c " : 4 > )

Discussion 0
Questions 48

Which of the following command inside aggregate command is used in MongoDB aggregation to filter the documents to pass only the documents that match the specified condition(s) to the next pipeline stage.

Options:

A.  

$aggregate

B.  

$sum

C.  

$match

D.  

$group

Discussion 0
Questions 49

In a collection that contains 100 post documents, what does the following command do? db. posts. find().skip(5).limit(5)

Options:

A.  

Skip and limit nullify each other. Hence returning the first five documents

B.  

Limits the first five documents and then return them in reverse order

C.  

Skips the first five documents and returns the sixth document five times

D.  

Skips the first five documents and returns the next five

Discussion 0
Questions 50

What are the audit log destinations? (Select three)

Options:

A.  

syslog

B.  

file

C.  

TCP/IP port

D.  

database

E.  

console

Discussion 0
Questions 51

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 "

Discussion 0