MongoDB Development and Database Engineering MongoDB Certified Developer Associate Exam, Exams of Database Management Systems (DBMS)

MongoDB Development and Database Engineering MongoDB Certified Developer Associate Exam Questions And Correct Answers (Verified Answers) Plus Rationales 2026 Q&A | Instant Download Pdf

Typology: Exams

2025/2026

Available from 05/30/2026

masterystudyhub
masterystudyhub 🇺🇸

4.7

(3)

4.4K documents

1 / 38

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
MongoDB Development and Database
Engineering MongoDB Certified
Developer Associate Exam Questions
And Correct Answers (Verified Answers)
Plus Rationales 2026 Q&A | Instant
Download Pdf
Question 1
Which data model does MongoDB primarily use?
A. Relational tables
B. Key-value pairs only
C. Document-oriented model
D. Graph-based model
Answer: C. Document-oriented model
Rationale: MongoDB is a NoSQL database that uses a document-oriented data
model where data is stored in flexible, JSON-like BSON documents. This allows
nested structures, arrays, and dynamic schemas, making it more flexible than
traditional relational databases.
Question 2
Which command is used to switch databases in MongoDB?
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

Partial preview of the text

Download MongoDB Development and Database Engineering MongoDB Certified Developer Associate Exam and more Exams Database Management Systems (DBMS) in PDF only on Docsity!

MongoDB Development and Database

Engineering MongoDB Certified

Developer Associate Exam Questions

And Correct Answers (Verified Answers)

Plus Rationales 2026 Q&A | Instant

Download Pdf

Question 1 Which data model does MongoDB primarily use? A. Relational tables B. Key-value pairs only C. Document-oriented model D. Graph-based model Answer: C. Document-oriented model Rationale: MongoDB is a NoSQL database that uses a document-oriented data model where data is stored in flexible, JSON-like BSON documents. This allows nested structures, arrays, and dynamic schemas, making it more flexible than traditional relational databases. Question 2 Which command is used to switch databases in MongoDB?

A. useDatabase() B. switch db C. use D. db.change() **Answer: C. use ** Rationale: The use command is used in the MongoDB shell to switch to a specific database. If the database does not exist, MongoDB will create it when data is first inserted. Question 3 What is a MongoDB collection? A. A set of databases B. A group of documents C. A schema definition D. A table relationship Answer: B. A group of documents Rationale: A collection in MongoDB is a grouping of documents, similar to a table in relational databases but without a fixed schema requirement. Question 4 Which format does MongoDB use to store data internally? A. XML B. JSON C. BSON D. CSV Answer: C. BSON

A. Foreign key B. Unique identifier for a document C. Collection name D. Index type Answer: B. Unique identifier for a document _Rationale: Every MongoDB document has an id field that uniquely identifies it within a collection. If not provided, MongoDB automatically generates it. Question 8 Which command retrieves all documents in a collection? A. findAll() B. db.collection.get() C. db.collection.find() D. select * Answer: C. db.collection.find() Rationale: The find() method is used to retrieve documents from a collection. Without parameters, it returns all documents. Question 9 Which index type improves text search? A. Hash index B. Text index C. Compound index D. Sparse index Answer: B. Text index Rationale: Text indexes are used in MongoDB to enable efficient text search queries across string content in documents.

Question 10 Which method updates a single document? A. updateOne() B. update() only C. modifyOne() D. setOne() Answer: A. updateOne() Rationale: updateOne() modifies the first document that matches a filter using update operators like $set. Question 11 Which operator is used to set field values? A. $set B. $update C. $change D. $assign Answer: A. $set Rationale: The $set operator updates the value of a field or creates it if it does not exist. Question 12 What is an aggregation pipeline? A. Backup system B. Sequence of data processing stages

Question 15 Which command deletes a single document? A. deleteOne() B. removeOne() C. dropOne() D. eraseOne() Answer: A. deleteOne() Rationale: deleteOne() removes the first document matching a filter condition. Question 16 What is sharding used for? A. Data encryption B. Horizontal scaling C. Query optimization only D. Backup storage Answer: B. Horizontal scaling Rationale: Sharding distributes data across multiple servers to support large- scale horizontal scaling in MongoDB. Question 17 Which component routes queries in a sharded cluster? A. mongod B. mongos C. config server D. shard server Answer: B. mongos

Rationale: mongos acts as a query router, directing operations to the appropriate shards in a cluster. Question 18 Which replication role can accept writes? A. Secondary B. Arbiter C. Primary D. Backup node Answer: C. Primary Rationale: Only the primary node in a replica set can accept write operations. Question 19 What is the purpose of an index? A. Encrypt data B. Improve query performance C. Store backups D. Compress collections Answer: B. Improve query performance Rationale: Indexes allow MongoDB to quickly locate documents without scanning entire collections. Question 20 Which command creates an index? A. db.collection.createIndex() B. db.collection.addIndex()

What is a capped collection? A. Encrypted collection B. Fixed-size collection C. Temporary cache D. Indexed collection only Answer: B. Fixed-size collection Rationale: Capped collections have a fixed size and automatically overwrite oldest documents when full. Question 24 Which operator checks for existence of a field? A. $exists B. $has C. $field D. $contains Answer: A. $exists Rationale: $exists checks whether a field is present in a document. Question 25 What does $in do? A. Matches values in an array B. Inserts multiple documents C. Increments values D. Indexes fields Answer: A. Matches values in an array Rationale: $in matches documents where a field value exists in a specified array.

Question 26 Which method returns only one document? A. findOne() B. findSingle() C. getOne() D. searchOne() Answer: A. findOne() Rationale: findOne() returns the first document matching a query. Question 27 What is MongoDB Atlas? A. Query language B. Cloud database service C. Indexing engine D. Backup tool Answer: B. Cloud database service Rationale: MongoDB Atlas is a fully managed cloud database platform provided by MongoDB. Question 28 Which operator removes a field? A. $unset B. $remove C. $delete D. $drop

C. Index creation D. Sharding Answer: B. Data recovery Rationale: Journaling ensures data durability by recording write operations for recovery after crashes. Question 32 Which operator is used for OR logic? A. $or B. $any C. $either D. $union Answer: A. $or Rationale: $or matches documents where at least one condition is true. Question 33 What is the default port for MongoDB? A. 3306 B. 27017 C. 8080 D. 1521 Answer: B. 27017 Rationale: MongoDB runs by default on port 27017. Question 34 Which command shows databases?

A. show dbs B. list db C. db.show() D. show databases() Answer: A. show dbs Rationale: show dbs lists all databases in the MongoDB instance. Question 35 What does $push do? A. Removes array elements B. Adds value to array C. Sorts array D. Updates index Answer: B. Adds value to array Rationale: $push appends values to an array field in a document. Question 36 What is a replica set? A. Backup file B. Group of MongoDB instances C. Index structure D. Query plan Answer: B. Group of MongoDB instances Rationale: A replica set is a group of MongoDB servers that maintain identical data for redundancy and high availability.

Rationale: $group groups documents by a specified field and performs aggregations like sum or average. Question 40 Which operator sorts results? A. $arrange B. $sort C. $order D. $rank Answer: B. $sort Rationale: $sort arranges documents in ascending or descending order. Question 41 Which operator is used to multiply a field value in aggregation? A. $multiply B. $mul C. $times D. $product Answer: A. $multiply Rationale: $multiply is an aggregation expression used to multiply numeric values or fields within the aggregation pipeline. Question 42 What does $project do in aggregation? A. Filters documents B. Reshapes documents

C. Deletes fields D. Sorts data Answer: B. Reshapes documents Rationale: $project controls which fields are included or excluded and can also transform fields in output documents. Question 43 Which command is used to rename a collection? A. db.collection.renameCollection() B. db.collection.rename() C. db.rename() D. collection.renameTo() Answer: A. db.collection.renameCollection() Rationale: renameCollection() changes the name of a collection within a database. Question 44 What does $addToSet do? A. Adds duplicate values B. Adds unique values only C. Sorts arrays D. Removes duplicates Answer: B. Adds unique values only Rationale: $addToSet ensures only unique values are added to an array field. Question 45

Rationale: $inc increases or decreases a numeric field by a specified value. Question 48 Which command removes all documents in a collection? A. deleteAll() B. remove({}) C. dropAll() D. clearCollection() Answer: B. remove({}) Rationale: remove({}) (legacy) deletes all documents; modern equivalent is deleteMany({}). Question 49 What is an embedded document? A. External file B. Document inside another document C. Index type D. Backup record Answer: B. Document inside another document Rationale: Embedded documents allow nested structures inside MongoDB documents for better data locality. Question 50 Which operator is used to divide values in aggregation? A. $divide B. $split

C. $div D. $ratio Answer: A. $divide Rationale: $divide performs division between numeric values in aggregation expressions. Question 51 What does $lookup do? A. Joins collections B. Filters documents C. Sorts data D. Groups data Answer: A. Joins collections Rationale: $lookup performs left outer joins between collections in aggregation pipelines. Question 52 What is the purpose of mongod? A. Query router B. Database server process C. Shell interface D. Backup tool Answer: B. Database server process Rationale: mongod is the core MongoDB daemon that runs the database server. Question 53