Docsity

MongoDB Certified Developer Associate Exam 2026: Professional Certification Practice Test, Exams of Nursing

Toggle sidebar
bg1
MongoDB Certified Developer Associate Exam 2026: Professional Certification Practice Test — CRUD Operations, Data modelling, Aggregation Pipelines, Indexing, Transactions & Performance Optimization — 190 Multiple-Choice Questions with Answers & Detailed RationalesPractice Examination — 190 QuestionsQuestion 1Which MongoDB component is responsible for storing the actual data on disk?A. mongos routerB. Config serverC. mongod processD. Application driverCorrect Answer: CExplanation: The mongod process is the primary daemon that stores data, manages collections, and handles read/write operations on disk.Question 2In a MongoDB replica set, which node accepts write operations by default?A. Secondary nodeB. Arbiter nodeC. Primary node
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Partial preview of the text

Download MongoDB Certified Developer Associate Exam 2026: Professional Certification Practice Test and more Exams Nursing in PDF only on Docsity!

MongoDB Certified Developer Associate Exam 2026: Professional Certification Practice Test — CRUD Operations, Data modelling, Aggregation Pipelines, Indexing, Transactions & Performance Optimization — 190 Multiple-Choice Questions with Answers & Detailed Rationales

Practice Examination — 190 Questions

Question 1

Which MongoDB component is responsible for storing the actual data on disk?

A. mongos router

B. Config server

C. mongod process

D. Application driver

Correct Answer: C

Explanation: The mongod process is the primary daemon that stores data, manages collections, and handles read/write operations on disk.

Question 2

In a MongoDB replica set, which node accepts write operations by default?

A. Secondary node

B. Arbiter node

C. Primary node

D. Hidden node

Correct Answer: C

Explanation: Only the primary node accepts writes in a replica set; secondaries replicate the primary's oplog asynchronously to maintain data redundancy.

Question 3

Which data format does MongoDB use to store documents internally?

A. JSON

B. XML

C. BSON

D. YAML

Correct Answer: C

Explanation: BSON (Binary JSON) extends JSON with additional types like Date and ObjectId, enabling efficient storage and traversal.

Question 4

What is the maximum size of a single BSON document in MongoDB?

A. 4 MB

B. 8 MB

C. 16 MB

B

eqB.match

C.

s a m e D.

sameD.is

Correct Answer: A

Explanation: $eq explicitly matches equality; implicit equality is also supported by specifying field:value directly.

Question 7

What does the $gt operator do in a MongoDB query?

A. Checks greater than or equal

B. Checks greater than

C. Checks global type

D. Checks grouping tag

Correct Answer: B

Explanation: $gt selects documents where the field value is strictly greater than the specified value.

Question 8

Which projection excludes the _id field from results?

A. {_id: 1}

B. {_id: 0}

C. {_id: false, exclude: true}

D. {noId: true}

Correct Answer: B

Explanation: Setting _id: 0 in a projection explicitly excludes the _id field from returned documents.

Question 9

Which index type does MongoDB create automatically on the _id field?

A. Compound index

B. Unique index

C. Text index

D. Geospatial index

Correct Answer: B

t

B

.

projectB.match

C.

g r o u p D.

groupD.sort

Correct Answer: B

Explanation: $match filters documents at the start of an aggregation pipeline, reducing downstream processing.

Question 12

Which aggregation stage reshapes documents by including or excluding fields?

A.

m

a

t

c

h

B

.

matchB.project

C.

g r o u p D.

groupD.unwind

Correct Answer: B

Explanation: $project controls field inclusion, exclusion, and computed fields in the aggregation output.

Question 13

What does the $group stage require to define grouping?

A. A _id expression

B. A sort key

C. A limit value

D. A skip value

Explanation: $sum accumulates numeric values across grouped documents, ignoring non- numeric fields.

Question 15

Which stage deconstructs an array field into multiple documents?

A.

s p l i t B.

splitB.unwind

C.

f l a t t e n D.

flattenD.expand

Correct Answer: B

Explanation: $unwind outputs one document per array element, enabling per-element aggregation or filtering.

Question 16

What is the purpose of the $lookup aggregation stage?

A. Looks up index statistics

B. Performs a left outer join with another collection

C. Searches text indexes

D. Looks up server status

Correct Answer: B

Explanation: $lookup joins documents from another collection in the same database, similar to SQL LEFT JOIN.

Question 17

Which write concern value acknowledges after journaling to disk?

A. w: 0

B. w: 1

C. w: "majority"

D. j: true

Correct Answer: C

Explanation: readPreference: "primary" routes all reads to the primary node, ensuring the most current data.

Question 20

Which MongoDB feature provides automatic failover in a replica set?

A. Sharding

B. Elections

C. GridFS

D. Change streams

Correct Answer: B

Explanation: When the primary becomes unavailable, replica set members hold elections to select a new primary automatically.

Question 21

What is the minimum recommended number of voting members in a replica set?

A. 1

B. 2

C. 3

D. 5

Correct Answer: C

Explanation: Three voting members allow a majority (2) to elect a primary while tolerating one failure.

Question 22

What role does an arbiter play in a replica set?

A. Stores data copies

B. Votes in elections without storing data

C. Routes queries

D. Manages backups

Correct Answer: B

Explanation: Arbiters participate in elections to break ties but do not store data or serve client requests.

Question 23

Which component stores metadata in a sharded cluster?

A. mongos

B. Config servers

C. Shard nodes

D. Application drivers

Correct Answer: B

Explanation: Ranged sharding assigns contiguous shard key ranges to chunks, supporting range queries efficiently.

Question 26

Which MongoDB method updates a single matching document?

A. updateOne()

B. updateMany()

C. replaceMany()

D. modifyOne()

Correct Answer: A

Explanation: updateOne() modifies the first document matching the filter, leaving other matches unchanged.

Question 27

Which update operator sets a field value?

A.

p

u

t

B

putB.set

C.

a s s i g n D.

assignD.field

Correct Answer: B

Explanation: $set assigns or creates a field with the specified value during an update operation.

Question 28

Which update operator removes a field from a document?

A.

d

e

l

e

t

Explanation: upsert: true inserts a new document if no document matches the update filter.

Question 30

Which option returns the modified document rather than the original in findOneAndUpdate?

A. {returnNew: true}

B. {new: true}

C. {updated: true}

D. {after: true}

Correct Answer: B

Explanation: new: true returns the post-update document; otherwise the pre-update document is returned.

Question 31

Which method deletes a single matching document?

A. deleteOne()

B. removeOne()

C. dropOne()

D. eraseOne()

Correct Answer: A

Explanation: deleteOne() removes the first document matching the filter and returns deletion count.

Question 32

What happens when deleteMany() is called with an empty filter?

A. Deletes nothing

B. Deletes the first document

C. Deletes all documents

D. Throws an error

Correct Answer: C

Explanation: An empty filter {} matches all documents, so deleteMany({}) removes every document in the collection.

Question 33

Which schema design pattern embeds related data in a single document?

A. Normalization

B. Embedding

C. Referencing

D. Sharding

Correct Answer: B