Halloween Sale Special 75% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: budy75

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

Questions 4

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

Buy Now
Questions 5

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

Buy Now
Questions 6

JSON stands for

Options:

A.

JavaScript Object Notation

B.

JavaScript Object Naming

C.

JavaScript Object Notice

D.

None of the above

Buy Now
Questions 7

As per the aggregation pipeline optimization concepts, if you have a $sort followed by a $match:

Options:

A.

Providing these parameters in any order does not impact the performance

B.

$sort moves before $match

C.

MongoDB does not do any movements by default and will use the order provided

D.

$match moves before $sort

Buy Now
Questions 8

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 9

Consider a collection posts which has fields: Jd, post_text, post_author, post_timestamp, post_tags etc. Which of the following query retrieves ONLY the key named post_text from the first document retrieved?

Options:

A.

db.posts.finOne({},{_id:0, post_text:1})

B.

db.posts.findOne({post_text: 1})

C.

db.posts.find({},{_id:Of post_text:1})

D.

db.posts.finOne«},{post_text:l})

Buy Now
Questions 10

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

C100DBA Question 10

Options:

Buy Now
Questions 11

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 12

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 13

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

Buy Now
Questions 14

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

Options:

A.

mongosh

B.

mongod

C.

mongostat

D.

mongotop

Buy Now
Questions 15

The difference between $push and $addToSet is:

Options:

A.

$addToSet needs the fields to be already present while $push will work even if the field is not present

B.

$addToSet adds the item to the field only if it does not exist already; while $push pushes the item to the field irrespective of whether it was present or not

C.

$addToSet adds the item to the field only if the new item is of the same datatype

D.

There is no major difference between them. $addToSet is a deprecated version of $push.

Buy Now
Questions 16

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 17

Which of the following does MongoDB use to provide High Availability and fault tolerance?

Options:

A.

Sharding

B.

Indexing

C.

Replication

D.

Write Concern

Buy Now
Questions 18

What is the purpose of enabling TLS?

Options:

A.

To automate backup and restore operations.

B.

To ensure high availability of the database.

C.

To improve query performance.

D.

To provide encryption of data in transit.

Buy Now
Questions 19

Addding the index {a:l} can potentially decrease the speed of which of the following operations? Check all that apply.

Options:

A.

db.collection.update({b:456 > , {$inc: {a:l > })

B.

db.collection.find( {a : 232} )

C.

db.collection.insert( { a:341})

Buy Now
Questions 20

A MongoDB collection named users contains sample documents with fields including name, age, address, description, city, and occupation.

The administrator uses the following query to perform a collection scan:

db.users.find({ city: " New York " , occupation: " Software Engineer " })

What compound index will improve the performance of the query the MOST?

Options:

A.

db.users.createIndex({ city: 1, name: 1 })

B.

db.users.createIndex({ city: 1, occupation: 1 })

C.

db.users.createIndex({ occupation: 1, name: 1 })

D.

db.users.createIndex({ occupation: 1, city: 1 })

Buy Now
Questions 21

Which is the default mode in which the explain() command runs?

Options:

A.

allPlansExecution

B.

customExecutionStats

C.

queryPlanner

D.

executionStats

Buy Now
Questions 22

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.

Buy Now
Questions 23

To add a new user and enable authentication in MongoDB, which of the following steps need be executed?

Options:

A.

update users collection and restart mongodb

B.

All of the above

C.

update users collection and restart mongodb with -auth option

D.

update users collection and run db.enableAuthenticationQ

Buy Now
Questions 24

If the value of totalKeysExamined is 30000 and the value of totalDocsExamined is 0, which of the following option is correct?

Options:

A.

None of the above

B.

The query used an index to fetch the results

C.

The query returned 0 documents

D.

The query returned 30000 documents after scanning the documents

Buy Now
Questions 25

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 26

Which node in a replica set does accept write operation?

Options:

A.

arbiter

B.

hidden

C.

primary

D.

secondary

Buy Now
Questions 27

What command should a MongoDB database administrator use to find the disk utilization of the order collection?

Options:

A.

db.stats()

B.

db.order.stats()

C.

db.hostInfo()

D.

db.serverStatus()

Buy Now
Questions 28

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 29

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

Buy Now
Questions 30

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

Options:

A.

Replication

B.

Write Concern

C.

Indexing

D.

Sharding

Buy Now
Questions 31

A MongoDB administrator is managing a database for a hospital system.

The patients collection contains:

- Carlos Martinez, diagnosis Hypertension, room 203

- Maria Lopez, diagnosis Hypertension, room 207

- Juan Perez, diagnosis Arrhythmia, room 207

The administrator runs:

db.patients.updateMany(

{ diagnosis: " Hypertension " },

{ $set: { room: 207 } }

)

What output should the administrator expect?

Options:

A.

acknowledged: true, matchedCount: 1, modifiedCount: 1

B.

acknowledged: true, matchedCount: 3, modifiedCount: 1

C.

acknowledged: true, matchedCount: 1, modifiedCount: 2

D.

acknowledged: true, matchedCount: 2, modifiedCount: 1

Buy Now
Questions 32

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

Buy Now
Questions 33

Which of the following node is used during election in a replication cluster?

Options:

A.

primary

B.

arbiter

C.

hidden

D.

secondary

Buy Now
Questions 34

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

Buy Now
Questions 35

The Production MongoDB Cluster contains Personally Identifiable Information, such as Name, Demographics, Date of Birth, and Government Identification Number. Due to strict compliance requirements, a database administrator is tasked to ensure a client ' s side encryption.

What feature should the administrator use to meet the requirement?

Options:

A.

Encrypted Storage Engine

B.

TLS/SSL

C.

Role Based Access Controls

D.

Queryable Encryption

Buy Now
Questions 36

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

Buy Now
Questions 37

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 38

In a replica set with a primary and two secondaries, what should the write concern be set to so only a single node is required to acknowledge a write operation before it is deemed successful?

Options:

A.

{ writeConcern: { w: " 1 " } }

B.

{ writeConcern: 1 }

C.

{ writeConcern: " 1 " }

D.

{ writeConcern: { w: 1 } }

Buy Now
Questions 39

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 39

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 40

Suposse tou have the following collection with only 2 documents:

C100DBA Question 40

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 41

Consider the following document from the products collection:

C100DBA Question 41

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 42

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

Buy Now
Questions 44

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 45

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 46

Which of the following needs to be performed prior to initiate backup on a sharded cluster?

Options:

A.

db.stopBalancer( )

B.

sh.stopServer( )

C.

db.stopServer( )

D.

sh.stopBalancer( )

Buy Now
Questions 47

Which of the following statements are true about the $match pipeline operator? Check all that apply.

Options:

A.

You should use it early as possible in the pipeline

B.

It can be used as many time as needed.

C.

It has a sintax similar to findQ commands.

Buy Now
Questions 48

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 49

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 49

Options:

A.

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

B.

db. posts.createIndex({^comments.author " :1});

C.

db.posts.createIndex({^commerits.author " ;-!});

Buy Now
Questions 50

You have a replicated cluster with 1 primary, 3 secondary, 1 arbiter. One of the secondary is hidden. What is the replication factor of this replicated cluster?

Options:

A.

7

B.

03

C.

04

D.

06

Buy Now
Questions 51

' 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
Exam Code: C100DBA
Exam Name: MongoDB Associate Database Administrator(Based on MongoDB 6.0 and 7.0+)
Last Update: Oct 18, 2026
Questions: 172

PDF + Testing Engine

$134.99

Testing Engine

$99.99

PDF (Q&A)

$84.99