Pre-Winter Sale 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: clap70

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

Questions 4

Below is a sample document in a given collection test.

{ a : 5, b : 3, c: 2, d : 1 >

Given a compound index { a: 1, b:l, c:l, d:l}, Which of the below query will not use in-memory sorting? Select

all valid.

Options:

A.

db.test.find( { a: 5, b: 3 } ).sort( { c: 1, d : 1 } )

B.

db.test.find( { a: 5, b: 3 } ).sort( { a: 1} )

C.

db.test.find( { a: 5, b: 3 } ).sort( { a: 1, b: 1, c: 1 > )

D.

db.test.find( { a: 5, b: 3 } ).sort( {c: 1 } )

Buy Now
Questions 5

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 6

An employees collection contains documents with fields such as _id, name, age, department, and salary.

A database administrator needs to run a query that will return ONLY the name and age fields for all employees.

Which query meets this requirement?

Options:

A.

db.employees.find({ name: 1, age: 1 }, { })

B.

db.employees.find({ name: 1, age: 1, _id: 0 }, { })

C.

db.employees.find({ }, { name: 1, age: 1, _id: 0 })

D.

db.employees.find({ }, { name: 1, age: 1 })

Buy Now
Questions 7

A database administrator maintains a MongoDB database that stores scientific papers. A paper with DOI 10.1000/xyz123 is no longer relevant and needs to be removed.

What query should the administrator use to delete the paper with the DOI equal to 10.1000/xyz123?

Options:

A.

db.scientificPapers.drop({ doi: " 10.1000/xyz123 " })

B.

db.scientificPapers.findOneAndDelete({ scientificPapers: " orders " , doi: " 10.1000/xyz123 " })

C.

db.scientificPapers.deleteOne({ doi: " 10.1000/xyz123 " })

D.

db.scientificPapers.deleteOne({ scientificPapers: " orders " }, { doi: " 10.1000/xyz123 " })

Buy Now
Questions 8

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 9

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

Buy Now
Questions 10

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 11

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 12

Consider a clothing collection that contains these documents:

{ " _id " : 1, " item " : " sweater " , " sizes " : [ " XS " , " S " ] }

{ " _id " : 2, " item " : " t-shirt " , " sizes " : [ " S " , " M " , " XL " ] }

{ " _id " : 3, " item " : " vest " , " sizes " : [ " M " , " L " , " XL " , " XXL " ] }

What does the following query return?

db.clothing.find({ " sizes " : " M " })

Options:

A.

Only document _id: 3.

B.

All three documents.

C.

Only document _id: 2.

D.

Documents _id: 2 and _id: 3.

Buy Now
Questions 13

Which of the following command is used to get all the indexes on a collection?

Options:

A.

db.collection.showIndexes()

B.

db.collection.findlndexes()

C.

db.showIndexes()

D.

db.collection.getlndexesQ

Buy Now
Questions 14

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 15

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 16

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 17

What tool would you use if you want to save a gif file in mongo?

Options:

Buy Now
Questions 18

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 19

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 20

What are the audit log destinations? (Select three)

Options:

A.

syslog

B.

file

C.

TCP/IP port

D.

database

E.

console

Buy Now
Questions 21

In a replica set, which member is responsible for maintaining copies of the primary ' s data?

Options:

A.

Secondary

B.

Mongos

C.

Arbiter

D.

Shard

Buy Now
Questions 22

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 23

What is a limitation of encryption at rest?

Options:

A.

It requires a lot of additional configuration.

B.

It protects against insecure network connections.

C.

It does not protect against data breaches.

D.

It can impact performance greatly.

Buy Now
Questions 24

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

Buy Now
Questions 25

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 26

Which TWO commands can be used to remove the role, " specialRole " from " user1 " ?

Options:

A.

db.revokeRolesFromUser( " user1 " , [{ " myDB " : " specialRole " }])

B.

db.revokeRoleFromUser( " user1 " , " specialRole " )

C.

db.revokeRolesFromUser( " user1 " , [{ role: " specialRole " , db: " myDB " }])

D.

db.revokeRoleFromUser({ user: " user1 " , role: " specialRole " })

E.

db.revokeRolesFromUser( " user1 " , [ " specialRole " ])

Buy Now
Questions 27

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 28

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 29

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 30

In a sharded cluster, from which node does one stop the balancer process before initiating backup?

Options:

A.

Any node

B.

replicaset primary node

C.

config server node

D.

mongos node

Buy Now
Questions 31

Which operations add new documents to a collection?

Options:

A.

Create

B.

update

C.

insert

D.

delete

Buy Now
Questions 32

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.

Buy Now
Questions 33

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 34

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.

Skips the first five documents and returns the next five

C.

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

D.

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

Buy Now
Questions 35

Which of the following commands will return all the posts with number of likes greater than 100 and less than 200, both inclusive?

Options:

A.

db.posts.find({ likes : { $gte : 100 , $lte : 200 } } );

B.

db.posts.find({ likes : { $gt : 100 , $lte : 200 } } );

C.

db.posts.find({ likes : { $gte : 100, $lt : 200 } } );

D.

db.posts.find({ likes : { $gt : 100, $lt : 200 > > );

Buy Now
Questions 36

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

Options:

A.

mongosh

B.

mongod

C.

mongostat

D.

mongotop

Buy Now
Questions 37

What does the following query do when performed on the posts collection? db.posts.update({_id:l},{Title:This is post with ID 1 " })

Options:

A.

Syntax error

B.

Replaces the complete document with _id as 1 with the document specified in second parameter

C.

Updates the Title of the post

D.

Updating a document is possible only with $set

Buy Now
Questions 38

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 39

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 40

Which of the following are valid json documents? Select all that apply.

Options:

A.

{ " a " :l, " b " :{ " b " :l, " c " : " foo " , " d " : " bar " , " e " :[l,2,4]}}

B.

{ " city " : " New York " , " population " , 7999034, boros:{ " queens " , " manhattan " , " staten island " , " the bronx " , u " brooklyn " }}

C.

{ " name " : " Fred Flintstone " ; " occupation " : " Miner " ; " wife " : " Wilma " }

D.

{ }

Buy Now
Questions 41

What is the use of mongodump and mongorestore tools?

Options:

A.

backup mongodb deployment

B.

audit mongodb deployment

C.

performance tune mongodb deployment

D.

replicate mongodb deployments

Buy Now
Questions 42

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

Buy Now
Questions 43

What is the purpose of elections in a replica set?

Options:

A.

A mechanism for replicating data across all replica set members asynchronously.

B.

A mechanism to choose a new primary when the current primary is no longer available.

C.

A mechanism to add new indexes to a running replica set.

D.

A mechanism to add additional secondaries when the current secondaries are unavailable.

Buy Now
Questions 44

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 45

Using an arbiter allows one to easily ensure an odd number of voters in replica sets. Why is this important?

Options:

A.

To help in disaster recovery

B.

To protect agains network partitions

C.

To enable certain read preference settings

D.

To add greather redundancy

E.

For more efficient backup operations

Buy Now
Questions 46

In mongodb how do you update a document partially?

Options:

A.

$project

B.

$update

C.

$modify

D.

$set

Buy Now
Questions 47

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

Buy Now
Questions 48

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

Buy Now
Questions 49

Consider that the posts collection contains an array called ratings which contains ratings given to the post by various users in the following format:

Which of the following query will return all the documents where the ratings array contains elements that in some combination satisfy the query conditions?

Options:

A.

db.inventory.find( { ratings: { $elemMatch: { $gte: 3, $lte: 6 } } } )

B.

db.inventory.find( { ratings: { $elemMatch: { $gt: 3, $lt: 6 }

C.

db.inventory.find( { ratings: { ratings.$: { $gt: 5, $lt: 9 } } } )

D.

db.inventory.find( { ratings: { ratings: { $gt: 5, $lt: 9 } } } )

Buy Now
Questions 50

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

Buy Now
Questions 51

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

C100DBA PDF

$25.5  $84.99
C100DBA Engine

C100DBA Testing Engine

$30  $99.99
C100DBA PDF + Engine

C100DBA PDF + Testing Engine

$40.5  $134.99