Courseiva

C100DBA · domain

scenario questions

Practise MongoDB Certified DBA Associate scenario questions practice questions — original exam-style scenarios with answer choices, explanations, and analysis of common mistakes.

222 questions49 easy112 medium61 hard

Focused practice

Practice scenario questions questions

Scored sessions drawing only from this domain — pick a length below.

Start 20-question practice test →

What this domain covers

What to know about scenario questions

scenario questions questions test whether you can apply the concept in context, not just recognise a definition.

How the topic appears in realistic exam-style scenarios.

Which detail in the question changes the correct answer.

How to eliminate plausible but wrong options.

How to connect the question back to the wider exam objective.

Watch out for

Common scenario questions exam traps

  • ▸Answering from memory before reading the full scenario.
  • ▸Missing a constraint such as cost, availability, security, scope or command context.
  • ▸Choosing a broad answer when the question asks for the most specific fix.
  • ▸Ignoring why the wrong options are tempting.

Question index

All scenario questions questions (222)

Click any question to see the full explanation, or start a practice session above.

1

An application uses a compound index on `{ 'status': 1, 'priority': -1 }`. Which query will efficiently use this index?

Medium
2

What is the primary benefit of using a Covered Query in MongoDB?

Medium
3

Refer to the exhibit. What is the primary cause of the performance issue seen in this query plan?

Hard
4

A collection has a 'status' field with only three possible values: 'active', 'pending', and 'closed'. Why is 'status' a poor choice for a shard key by itself?

Medium
5

Refer to the exhibit. What is the effect of the 'writeConcern' parameter in this operation?

Medium
6

A financial services company runs a sharded MongoDB cluster with three shards. They need to shard a new collection that stores transaction records. The collection will be queried primarily by 'accountId' and 'transactionDate'. The team wants to minimize scatter-gather queries and ensure even data distribution. Which two actions should they take when choosing and implementing the shard key? (Choose two.)

Hard
7

An organization wants to restrict customer data for European Union residents to a specific set of physical servers located in Frankfurt, complying with data residency regulations. Which MongoDB sharding feature should the DBA implement to achieve this?

Medium
8

A MongoDB DBA is configuring a new sharded cluster. The application requires that queries on the sharded collection include the shard key to avoid scatter-gather. The DBA decides to use a ranged shard key on the field 'region'. After sharding, the DBA notices that queries filtering only on 'region' are performing well, but queries that also filter on 'city' are still scanning all shards. What is the most likely cause?

Easy
9

How does the 'w: majority' write concern align with the philosophy of data reliability in MongoDB?

Medium
10

What happens to the replica set if a majority of voting members are permanently lost?

Medium
11

What happens if you run an update operation with the $set operator on a field that does not yet exist in the document?

Medium
12

A production MongoDB 6.0 sharded cluster has a collection with a ranged shard key on the field `customerId`. Over time, the team notices that nearly all new documents have monotonically increasing `customerId` values, and one shard is receiving a disproportionate share of writes while the other shards remain relatively idle. The balancer is enabled and running. Which of the following is the most likely explanation for this imbalance?

Medium
13

When using 'readConcern: majority', what is the specific guarantee provided to the client?

Hard
14

A security audit requires that sensitive document data contained in query parameters must not be written to the MongoDB system logs. Which server configuration setting should be enabled?

Medium
15

Refer to the exhibit. An aggregation pipeline is failing with an error. How can you modify the pipeline to allow it to process the large dataset?

Hard
16

What occurs when a replica set member experiences a 'rollback'?

Hard
17

Which command is used to check the current replication lag status on a secondary node?

Medium
18

Refer to the exhibit. What does this output indicate about the query performance?

Medium
19

A logistics company is designing a MongoDB database for a real-time shipment tracking system. The operations team needs to frequently update shipment statuses and query the latest events. The development team is debating the trade-offs of embedding versus referencing for the shipment events. Which two considerations align with MongoDB's philosophy for this scenario? (Choose two.)

Hard
20

A retail application stores product documents in the `products` collection. Each document has an `inventory` array of embedded subdocuments, for example: `{ _id: 1, name: "Widget", inventory: [ { sku: "A1", qty: 5 }, { sku: "B2", qty: 8 } ] }`. The warehouse team needs to increase the `qty` of the subdocument with `sku: "B2"` by 3 for the product with `_id: 1`. Which update operation accomplishes this?

Medium
21

A developer needs to insert a document into the inventory collection and wants the operation to fail with a duplicate key error if a document with the same value for the sku field already exists. The sku field has a unique index. Which insert method and option combination achieves this with the least code?

Easy
22

Which operator is best used to add an element to an array only if it does not already exist?

Medium
23

A DBA is reviewing update operations that use the upsert option. Which TWO statements about upsert behavior in MongoDB are correct? (Choose two.)

Medium
24

A collection called events stores documents with an array field named tags. You need to remove all occurrences of the string "obsolete" from the tags array in every document where the array contains that value, without affecting other elements. Which update operator should you use?

Medium
25

A DBA notices that a query on the products collection uses an index scan but returns only a small fraction of documents. The index is { category: 1, price: 1 }. The query filters on category and price with a range condition on price. Which statement best describes why the index might still be efficient despite scanning many index entries?

Easy
26

An administrator needs to distribute a high-throughput collection evenly across a sharded cluster using a hashed shard key. What is the primary characteristic of MongoDB's hashed sharding strategy that makes it effective for preventing write bottlenecks?

Medium
27

A DBA executes 'mongodump --oplog' against a primary node in a replica set. What is the specific purpose of the --oplog flag in this administrative context?

Medium
28

A sharded cluster has a three-member replica set for its config servers. If two of the three config servers go offline, what is the immediate impact on the cluster's operations?

Medium
29

Refer to the exhibit. Which index is most effective for this query?

Hard
30

Which connection string parameter should be used to ensure an application driver automatically discovers all members of a replica set?

Easy
31

When using the find() method, which cursor modifier is used to skip a specific number of documents before returning results?

Easy
32

An application executes a query on a sharded collection that does not include the shard key. What is the impact on the cluster performance?

Medium
33

Which THREE actions occur when a MongoDB secondary node performs an initial sync?

Hard
34

Which situation is best suited for a Multikey Index?

Medium
35

What is the consequence of having a high number of 'keysExamined' compared to 'nReturned' in a query?

Medium
36

What happens when you perform a find() query on a collection where the projection includes both an inclusion and an exclusion for different fields?

Hard
37

When evaluating index performance, what is the impact of a 'partial index'?

Hard
38

A company is migrating from a monolithic SQL database to MongoDB. They want to maintain high availability. Which feature is most critical to their success?

Medium
39

A collection 'events' has a compound index { tenantId: 1, createdAt: -1 }. A developer runs db.events.find({ tenantId: "acme", createdAt: { $gte: ISODate("2024-01-01") } }).sort({ createdAt: -1 }).limit(50). The explain output shows the index is used but the query still performs a large in-memory sort. Which action resolves the sort performance issue?

Medium
40

You are a DBA for a MongoDB replica set. A secondary node has been down for several days and is far behind the primary. The oplog on the primary has wrapped, and the secondary's last oplog entry is no longer present. What must you do to bring the secondary back into sync?

Medium
41

Refer to the exhibit. An administrator inspects chunk metadata for a sharded collection using a compound shard key: { region: 1, account_id: 1 }. What does the presence of MinKey and MaxKey signify in this specific chunk range definition?

Hard
42

A MongoDB 6.0 sharded cluster has a collection sharded with a hashed shard key on 'userId'. The operations team needs to run an aggregation that groups documents by 'userId' and calculates the total transaction amount. They want to know whether the aggregation can be optimized to run only on the shards that contain the relevant 'userId' values. Which statement describes the correct behavior?

Hard
43

You are updating a document in the `products` collection. The document has an array field `tags`. You need to add the tag "sale" to the array only if it does not already exist, and you want to ensure that no duplicate tags are added even if multiple updates run concurrently. Which update operator should you use?

Medium
44

A media company stores articles with nested comments and tags. The development team wants to retrieve an article along with its comments in a single database round trip. Which MongoDB philosophy supports this design?

Medium
45

Refer to the exhibit. What is the impact of this operation on the document?

Hard
46

A startup is building a content management system where the document structure varies significantly between blog posts, product pages, and user profiles. Which fundamental MongoDB philosophy best supports this requirement?

Medium
47

What is the primary function of the 'wtimeout' setting in write concern?

Medium
48

An administrator wants to audit all authentication attempts on a MongoDB Enterprise instance. Which feature should be configured to track these events?

Medium
49

A DBA is reviewing a slow query on the `orders` collection. The query is: `db.orders.find( { status: "shipped", total: { $gt: 100 } } )`. The collection has an index on `{ status: 1, total: 1 }`. Which statement best describes how MongoDB will use this index to satisfy the query?

Easy
50

Which TWO of the following are valid reasons to use an arbiter in a MongoDB replica set?

Medium
51

Which mechanism ensures an application receives an error if a write is not persisted to the majority of nodes in a replica set?

Medium
52

A DBA is troubleshooting a slow query on a large collection. Which two techniques directly reduce the number of documents the query must examine for an equality-plus-range predicate? (Choose two.)

Medium
53

A healthcare startup is evaluating MongoDB for a patient management system. The CTO asks how MongoDB ensures data durability and consistency across multiple servers without manual intervention. Which feature best describes MongoDB's built-in mechanism for automatic failover and data redundancy?

Easy
54

A development team is building a Node.js application that connects to a MongoDB replica set. They want the driver to automatically retry certain write operations once if they fail due to a transient network error, without requiring custom retry logic in their code. Which connection string option should they enable?

Medium
55

What is the consequence of MongoDB's 'write concern' in a distributed environment?

Hard
56

When is it appropriate to use a hashed shard key instead of a ranged shard key in a MongoDB sharded collection?

Hard
57

An e-commerce application frequently runs a query filtering by category and sorting by price descending. Which index structure provides the optimal performance for this access pattern?

Medium
58

A sharded cluster has a collection sharded on `{ location: 1 }`. A query is executed with the filter `{ location: { $in: ["NY", "CA"] } }`. How does MongoDB route this query?

Medium
59

You are configuring a MongoDB replica set for a global application. You need to add a member that will never become primary and will be invisible to client applications. Which two steps must you take when adding this member? (Choose two.)

Hard
60

A startup is building a mobile app backend. They want to iterate quickly on features without downtime for schema changes. Which MongoDB characteristic best supports this agile development approach?

Easy
61

A database administrator wants to configure a read preference that directs all read operations to the primary node of a replica set, ensuring the most up-to-date data. Which read preference mode should be used?

Easy
62

An application needs to perform a series of reads and writes across multiple documents in two collections atomically. The deployment is a replica set running MongoDB 4.2. Which feature should the application use?

Easy
63

When designing a compound shard key in MongoDB, what is the architectural significance of placing a high-cardinality field as the prefix compared to placing a low-cardinality field first?

Hard
64

Refer to the exhibit. An application queries active user documents frequently, but explainPlan output reveals a COLLSCAN stage. What is the most appropriate remediation step?

Hard
65

A database is experiencing high latency. You run 'mongotop 5'. What specific insight does this provide compared to 'mongostat' for server administration?

Easy
66

A DBA is troubleshooting a sharded cluster where the balancer is not migrating chunks even though there is an imbalance. The DBA runs `sh.getBalancerState()` and it returns `true`. Which of the following is the most likely reason the balancer is not migrating chunks?

Hard
67

A DBA observes that a query with filter { a: 5, b: { $gt: 10 } } and sort { c: 1 } is using a collection scan despite the existence of an index { a: 1, b: 1, c: 1 }. The DBA wants to improve performance. Which action is most likely to allow the index to support both the filter and the sort?

Hard
68

A global IoT platform ingests sensor readings from millions of devices. The team must choose a database that can store semi-structured data, scale horizontally, and provide high write throughput. Which TWO MongoDB features directly support these requirements? (Choose two.)

Hard
69

A server has multiple network interfaces including a public IP and a private management IP. How should the 'net.bindIp' configuration be managed to follow security best practices?

Easy
70

You are maintaining an inventory collection where each document has a field named `stock` (integer). A nightly job needs to atomically decrement `stock` by 1 for the document with `sku: "A100"` and also insert the current timestamp into a `lastUpdated` field in the same operation, without overwriting any other fields. Which update operation should you use?

Medium
71

A DBA is configuring a replica set with three members: one primary and two secondaries. The DBA wants to ensure that a write concern of { w: 'majority' } is acknowledged only after the write has been applied to a majority of voting members and has been written to the on-disk journal on those members. Which write concern should the DBA use?

Hard
72

What is the primary benefit of the BSON format in MongoDB?

Easy
73

Which method is the safest way to delete a single document from a collection based on a unique identifier?

Easy
74

In a replica set, what is the 'oplog' and why is it important?

Easy
75

Which THREE of the following are valid MongoDB CRUD query operators?

Hard
76

You are the DBA for a MongoDB 6.0 replica set with three voting members: rs0-primary (priority 2), rs0-secondary-1 (priority 1), and rs0-secondary-2 (priority 1). The primary fails and is unavailable for an extended period. You need to ensure that rs0-secondary-1 is elected as the new primary instead of rs0-secondary-2. Which action should you take before the primary fails?

Medium
77

Which of these best describes MongoDB's approach to the CAP theorem?

Medium
78

Which of the following describes the 'schema-less' nature of MongoDB?

Easy
79

When adding a new member to an existing replica set, what is the most common reason for the initial sync process to fail if the data set is extremely large?

Medium
80

When would you choose to create a Partial Index instead of a standard index?

Medium
81

A financial application requires that read operations never return data that could later be rolled back, even if it means reading from a secondary. The application connects to a replica set with readPreference=secondary. Which read concern level should be used to guarantee that the data read has been acknowledged by a majority of replica set members and cannot be rolled back?

Medium
82

Which TWO of the following scenarios are best handled by a Hashed Index?

Hard
83

A DBA needs to grant a new application service account the ability to read and write data in any database except the admin database on a MongoDB 6.0 replica set. The account should not be able to perform administrative actions such as managing users or shutting down the server. Which built-in role should the DBA assign?

Easy
84

Refer to the exhibit. What philosophy regarding client connectivity does this log entry reflect?

Medium
85

When enabling access control on a production sharded cluster, what is the most secure method for ensuring internal authentication between cluster components such as mongos and mongod instances?

Hard
86

An application is using a capped collection for logging. What happens when the collection reaches its configured size limit?

Medium
87

Refer to the exhibit. What is the implication of setting the priority of n2 to 0?

Hard
88

How can you prevent a specific node from becoming a primary in a replica set?

Medium
89

Which method is the most efficient way to perform a bulk update of multiple documents in a single request?

Medium
90

Which TWO of the following are primary benefits of implementing sharding in a MongoDB environment?

Easy
91

In a dedicated server environment, what is the primary reason an administrator would choose to manually decrease the 'storage.wiredTiger.engineConfig.cacheSizeGB' below the default value?

Medium
92

An application needs to update a user's balance. Which method ensures the operation is atomic for a single document?

Easy
93

A DBA needs a query that returns only the fields name and email from a 'users' collection, filtered by an equality on email, to avoid fetching full documents from disk. Which index design supports this efficiently?

Easy
94

A multi-document transaction is being executed across multiple shards. Which component is responsible for coordinating the transaction and ensuring the all-or-nothing property?

Hard
95

A logistics company uses MongoDB to track shipments. Each shipment document includes a status field and an array of location updates. The company wants to ensure that when a shipment's status changes to "delivered," the corresponding location update is also recorded atomically. Which MongoDB feature best supports this requirement while adhering to the philosophy of document atomicity?

Medium
96

A developer needs to retrieve a subset of fields from a collection. Which TWO methods achieve this using projection?

Medium
97

A DBA needs to ensure that chunk migrations only occur during a specific maintenance window from 02:00 to 04:00. Which configuration change is required?

Medium
98

A high-traffic e-commerce application requires a schema that avoids multi-document transactions where possible to ensure maximum throughput. Which MongoDB philosophy aligns best with this requirement?

Medium
99

An operations engineer notices that a frequently executed aggregation pipeline fails with a 'Exceeded memory limit for $sort' error. Which index configuration best resolves this memory constraint?

Medium
100

A DBA is designing indexes for a collection that stores user activity logs. The collection has fields: user_id, action, timestamp, and metadata (an embedded document). The most common queries are: (1) find all actions for a given user_id sorted by timestamp descending; (2) find all users who performed a specific action within a time range. Which TWO indexes would best support these queries? (Choose two.)

Medium
101

Which THREE of the following are core tenets of the MongoDB philosophy regarding data modeling?

Hard
102

What is the result of applying a $push operator with a value of [1, 2] to an existing array field [0]?

Medium
103

When evaluating the performance of a 'hint' in MongoDB, what should you keep in mind?

Medium
104

A collection 'logs' receives continuous inserts and is queried by both timestamp ranges and a rarely used severity field. A DBA creates six indexes to cover every query variant, and now insert throughput has dropped sharply while index sizes dominate the working set. Which action best restores insert throughput while preserving the important query paths?

Hard
105

An application uses a MongoDB driver that supports retryable writes. A write operation is sent to the primary, which applies the write but crashes before sending the acknowledgment. The driver receives a network error. What will the driver do by default?

Hard
106

A MongoDB DBA is asked to ensure that the mongod process on a Linux server automatically restarts if it crashes. The server uses systemd. Which command should the DBA run to enable this behavior?

Easy
107

Which THREE components are required to form a functional MongoDB sharded cluster?

Easy
108

Which MongoDB feature allows an application to receive real-time updates when data changes in a collection?

Medium
109

You are a MongoDB DBA at a retail company. The 'orders' collection has a document with _id: 100 and status: 'pending'. You need to atomically update the status to 'shipped' only if the current status is 'pending'. Which update operation should you use?

Medium
110

In a three-node replica set with default write concerns, what occurs when the primary node experiences a network partition and cannot communicate with the majority of the set?

Medium
111

A MongoDB 6.0 sharded cluster has a collection with a ranged shard key on the field 'customerId'. The balancer has been running normally, but the operations team notices that one shard consistently holds significantly more chunks than the others. They want to understand which internal metadata collection the mongos uses to determine chunk distribution and to verify the current chunk-to-shard mapping. Which collection should they query?

Medium
112

A MongoDB application requires that reads never see data that could be rolled back, even in the event of a replica set failover. The application also needs to read from secondary nodes to distribute load. Which read concern should be used with a secondary read preference?

Hard
113

An administrator notices that the balancer in a MongoDB sharded cluster is repeatedly migrating chunks between two shards, causing performance degradation. The administrator wants to temporarily stop the balancer to investigate. Which command should be used on mongos?

Medium
114

What is the primary motivation for MongoDB's 'WiredTiger' storage engine to provide document-level concurrency control?

Hard
115

Refer to the exhibit. Which documents will this query return?

Medium
116

You are a MongoDB DBA and need to retrieve all documents from the 'products' collection where the 'price' field is greater than 100 and the 'category' is 'electronics'. Which query accomplishes this?

Easy
117

A developer chooses Hashed Sharding for a collection. What is a significant limitation of this sharding strategy compared to Ranged Sharding?

Medium
118

An application uses a time-series collection. What is the benefit of using the TTL (Time-To-Live) index feature?

Medium
119

An engineering team must shard a high-volume collection tracking global financial transactions. The chosen shard key is based on a timestamp field containing the exact millisecond of each transaction. Why will this specific shard key choice severely degrade cluster write performance over time?

Medium
120

What is the result of setting the 'votes' configuration to 0 for a specific node in a replica set?

Medium
121

Which THREE metrics provided by the 'mongostat' utility are most helpful for identifying a performance bottleneck caused by a high volume of concurrent write operations?

Hard
122

A support team reports that a MongoDB 6.0 replica set is experiencing slow queries on a collection where almost every document has a unique value for the field status. A developer suggests creating a hashed index on status to speed up equality lookups. Which outcome should the DBA expect?

Easy
123

Which query operator matches documents where a field contains a value greater than or equal to a specified value?

Medium
124

When a secondary node is lagging behind the primary, what is the most significant risk to the replica set if the lag time exceeds the length of the oplog?

Medium
125

Refer to the exhibit. The MongoDB process has crashed due to a storage engine error. What is the most immediate administrative action required to restore service?

Hard
126

Which feature of MongoDB allows it to scale horizontally by distributing data across multiple physical servers?

Easy
127

Refer to the exhibit. If the primary node fails, which node is most likely to be elected the next primary based on optime?

Hard
128

Which operator is used to perform a logical OR operation across multiple query conditions?

Medium
129

What is the primary function of the oplog in a MongoDB replica set?

Easy
130

What is the primary function of the 'projection' parameter in the find() method?

Easy
131

A social media company is using MongoDB to store user posts and comments. The application needs to retrieve a post along with its most recent comments in a single query. Which data modeling approach best aligns with MongoDB's philosophy to optimize this access pattern?

Medium
132

A sharded cluster stores customer documents in the customers collection, sharded on the customerId field. An application runs an updateOne with the filter { email: "user@example.com" } and the update { $set: { tier: "gold" } }. The email field is not the shard key and has no index. What is the most likely outcome of this operation?

Hard
133

A developer is using the MongoDB Node.js driver and wants to ensure that a write operation is acknowledged by a majority of replica set members and is also written to the on-disk journal before returning success. Which write concern should be specified?

Medium
134

What is the primary purpose of an Arbiter in a MongoDB replica set?

Medium
135

During a peak load period, the 'page faults' metric in mongostat increases significantly. What is the most likely administrative cause related to server resources?

Medium
136

A healthcare provider is building a patient portal that must remain available even if a data center loses power. The operations team wants the database to continue accepting writes during a single-region outage. Which MongoDB philosophy directly enables this resilience?

Medium
137

A DBA needs to automate log rotation on a Linux-based MongoDB server without restarting the mongod process. Which signal or command should be used to ensure the current log file is archived and a new one is started?

Medium
138

A DBA is preparing to shard a collection in a MongoDB 6.0 cluster. The collection currently has no indexes other than the default _id index. The chosen shard key is { userId: 1 }. What must the DBA do before running shardCollection?

Easy
139

You are monitoring a MongoDB replica set and notice that the replication lag on a secondary is increasing steadily. You suspect that the secondary is unable to keep up with the write load. Which administrative action should you take first to diagnose the issue?

Medium
140

A MongoDB DBA is configuring a new application to connect to a sharded cluster. The application requires that reads are distributed across shards and that the driver automatically routes queries to the appropriate shard based on the shard key. Which component must be included in the connection string to enable this routing?

Medium
141

Which TWO statements accurately describe the behavior and management of orphaned documents in a MongoDB sharded cluster? Choose 2 answers.

Hard
142

Why does MongoDB use a 'document' as its fundamental unit of data?

Medium
143

Which command is used to verify the current replica set configuration and the state of all members?

Easy
144

An application is performing many updates to a document. Which strategy is most effective to avoid fragmentation in the data files?

Medium
145

Why does MongoDB support both embedding and referencing in data modeling?

Medium
146

Refer to the exhibit. The explain output shows a SORT stage wrapping an IXSCAN stage. What is the performance implication of this execution plan?

Hard
147

A DBA is investigating a performance issue. A query on the `logs` collection uses the following filter: `{ $or: [ { level: "error" }, { level: "warning" } ] }`. There is an index on `{ level: 1 }`. Which statement correctly describes how MongoDB executes this query?

Hard
148

A developer reports slow queries on a specific collection. You decide to enable the database profiler to capture only queries taking longer than 200ms. Which command configuration achieves this?

Easy
149

A three-member replica set has default settings, and all three members are healthy. A DBA needs to perform an index build on the primary during business hours. Which concern should the DBA consider regarding replica set behavior?

Easy
150

A database administrator is configuring a MongoDB replica set. The application requires that writes are acknowledged by a majority of voting members before being considered successful, and that the write is also written to the on-disk journal before acknowledgment. Which write concern specification achieves this?

Hard
151

Refer to the exhibit. An administrator attempts to recover a corrupted standalone mongod instance using the --repair flag. Based on the error log output, what is the most appropriate next step for the administrator?

Hard
152

Which cursor method should you use to sort documents by a field named 'age' in descending order?

Medium
153

How does the 'Replica Set' architecture influence client application design?

Hard
154

A DBA is adding a new secondary to an existing replica set. The data set is 2 TB, and the network bandwidth between the new member and the primary is 100 Mbps. The DBA wants to minimize the impact on the primary during the initial sync. Which approach should the DBA take?

Medium
155

Why does MongoDB choose the BSON format over JSON for storage?

Hard
156

A MongoDB 6.0 sharded cluster uses a shard key of { region: 1, customerId: 1 } for a global order collection. Most queries filter on customerId only, without region. The operations team observes that nearly every read is a scatter-gather across all shards. What is the most accurate explanation for this behavior?

Medium
157

A development team is building a real-time analytics dashboard that reads from a MongoDB replica set. The dashboard can tolerate slightly stale data but must never show data that could be rolled back. The team also wants to minimize read latency. Which read concern should they use?

Medium
158

A DBA is troubleshooting a replica set where the secondary is consistently lagging behind the primary by several hours. The DBA notices that the secondary's optime is far behind the primary's optime, and the secondary's oplog window is only 1 hour. The primary has a heavy write workload. Which action should the DBA take to reduce the replication lag and prevent the secondary from falling off the oplog?

Hard
159

An administrator notices that the MongoDB balancer is actively migrating chunks during peak business hours, causing noticeable application latency spikes. What is the standard administrative approach to mitigate this performance impact?

Medium
160

A development team is building a mobile application backend using MongoDB. They want to ensure that the application can handle rapid changes to the data model without requiring database downtime or complex migrations. Which MongoDB feature directly supports this requirement?

Easy
161

An administrator needs to create a restricted user for a third-party monitoring tool. The user must be able to perform backups and monitor server status but cannot read actual document data. Which TWO built-in roles should be combined?

Hard
162

Which design principle explains why MongoDB uses a document-oriented model instead of a rigid tabular schema?

Medium
163

You are the DBA for a three-member MongoDB replica set. The primary becomes unreachable due to a network partition, and two secondaries remain in communication. After the election timeout, one secondary is elected primary. What is the required condition for a new primary to be elected?

Medium
164

During routine cluster maintenance, an administrator needs to remove an underperforming shard from a production MongoDB sharded cluster safely. What is the mandatory first step the administrator must execute?

Medium
165

A financial application must ensure that once a transaction is committed, the data will never be rolled back, even if the primary node crashes immediately after the write is acknowledged. Which write concern should be used?

Medium
166

Which TWO of the following are essential for maintaining performance in a sharded cluster?

Hard
167

Which design principle should guide the decision between embedding and referencing?

Medium
168

When designing an application, what is the best practice for handling connection pools?

Easy
169

A MongoDB 6.0 replica set has a collection called orders with the default read concern. Users occasionally see an order document that still shows status "pending" even though a separate application thread just updated it to "shipped" and received an acknowledgment. The update used default write concern and targeted a single document by _id. Which read concern should you set on the read operation to guarantee the read returns data acknowledged by a majority of replica set members?

Medium
170

A financial services company is evaluating MongoDB for a new application that requires strong consistency for critical transactions and high availability across multiple data centers. The team must choose features that align with MongoDB's philosophy of balancing consistency, availability, and partition tolerance. (Choose two.)

Medium
171

An application frequently queries a large collection using two fields: 'category' (equality) and 'timestamp' (range). Which index strategy provides the most efficient execution plan?

Medium
172

An application issues a find query against a sharded collection without including the shard key in the query filter. How does the mongos query router handle this operation?

Medium
173

Which capability of MongoDB's document model most significantly distinguishes it from key-value stores?

Hard
174

Refer to the exhibit. An administrator attempts to execute the shardCollection command but receives the displayed error message. What is the root cause of this failure?

Hard
175

A sharded cluster experiences poor query performance because a targeted query targeting a specific shard key still results in a scatter-gather operation across all shards. What is the root cause?

Hard
176

Why should you avoid creating too many indexes on a single collection?

Medium
177

A financial services team is designing a real-time fraud detection system. They need a database that can store alerts with flexible, evolving fields such as device fingerprint, geolocation, and transaction metadata, and that can scale horizontally across many nodes. Which MongoDB philosophy best supports this requirement?

Easy
178

An application serves users in Europe and North America. The DBA wants to ensure that European user data stays on shards located in Europe to comply with data residency laws. Which feature should be used?

Hard
179

Which update operator would you use to increase the value of a numeric field by a specific amount?

Medium
180

When adding a new node to an existing replica set, what is the primary factor that determines how quickly the new member will be able to begin participating in elections?

Medium
181

Which connection string parameter should be used to ensure that an application only reads data from nodes that are considered current and consistent?

Easy
182

You are a DBA for a MongoDB replica set. A developer asks you to explain what the oplog is and why it is important. What is the correct description?

Easy
183

A DBA is reviewing a query that performs a sort on a field named score in descending order. The collection has an index { score: 1 }. The query also includes a filter on a field named active with an equality condition. The DBA observes that the query planner chooses a collection scan and performs an in-memory sort. Which index would allow the query to use an index for both the filter and the sort?

Hard
184

Which property of a field makes it a poor candidate for an index?

Easy
185

Refer to the exhibit. What is the primary benefit of the data structure shown?

Easy
186

Refer to the exhibit. A developer attempts to run a query using both 'tags' and 'location' in a single $and operation. What is the expected behavior regarding index usage?

Hard
187

A MongoDB DBA is investigating replication lag on a secondary member named rs0-2. The DBA runs rs.status() and notices that the 'optimeDate' of rs0-2 is several hours behind the primary's 'optimeDate'. The DBA wants to quickly determine the exact time difference. Which field in the rs.status() output should the DBA compare to calculate the replication lag?

Easy
188

A MongoDB 6.0 replica set is experiencing performance issues during peak hours. The DBA notices that the primary is spending significant time on disk I/O. The DBA wants to identify which collections are generating the most disk reads and writes. Which administrative command should the DBA use?

Medium
189

An application requires high write throughput for time-series data indexed by a timestamp field. You observe that all incoming data is being routed to a single shard, creating a write hotspot. Which shard key strategy best resolves this performance bottleneck?

Medium
190

A social media platform uses MongoDB to store user posts. Each post document contains an array of comments. The platform's engineers notice that some posts have tens of thousands of comments, causing documents to approach the 16 MB size limit and degrading read performance. They want to redesign the schema to handle this growth while preserving the ability to retrieve a post with its most recent comments efficiently. Which approach best aligns with MongoDB's schema design philosophy?

Hard
191

A MongoDB sharded cluster has a collection with a hashed shard key on the field 'userId'. A query is executed that includes an equality condition on userId. How does mongos route this query?

Hard
192

Which THREE of the following are core pillars of the MongoDB architecture?

Hard
193

A company stores IoT sensor data with a high ingestion rate. They use a monotonically increasing timestamp as the shard key. What is the most likely performance bottleneck for this cluster?

Medium
194

A database administrator is setting up a new sharded cluster and needs to enable sharding on a database named 'sales' before sharding any collections. Which command should be executed on mongos to enable sharding for this database?

Easy
195

A financial services firm is migrating its reporting application from a relational database to MongoDB. The lead architect argues that MongoDB's schema-less design will eliminate the need for data modeling. Which statement best describes MongoDB's philosophy regarding schema design?

Medium
196

What is the purpose of the 'write concern' in MongoDB?

Easy
197

A DBA needs to optimize a query that filters on a field with high cardinality, such as email, and also sorts on a low cardinality field, such as country. The query is { email: "user@example.com" } with sort { country: 1 }. Which index would best support this query?

Medium
198

Which read concern provides the strongest consistency guarantee by ensuring the data returned has been acknowledged by a majority of the replica set?

Easy
199

Which TWO of the following are benefits of the MongoDB 'document' model over the traditional 'relational' model?

Medium
200

In a three-node replica set with default write concern w:1, what happens to an unacknowledged write if the primary crashes immediately after receiving the write command but before replicating it to secondaries?

Medium
201

You need to remove a single document from the `users` collection where the `email` field is "alice@example.com". The collection has a unique index on `email`. Which method should you use?

Easy
202

A financial services company shards a transactions collection using a ranged shard key on an incrementing timestamp field. Over several months, the cluster develops a single hot shard that receives almost all writes, while the other shards remain nearly idle. Which change best addresses the root cause while preserving efficient range queries on timestamp?

Hard
203

Which configuration file setting is used to specify the network interface and port that a mongod instance listens on?

Easy
204

An application frequently queries a large collection by 'user_id' and 'status', sorting the results by 'timestamp'. Which index provides the most efficient execution plan?

Medium
205

Which method should you use to update multiple documents in a collection and insert a new document if no matches are found?

Medium
206

Which read preference allows the application to read from the closest member of the replica set to minimize network latency?

Easy
207

When performing a findOne operation, what does MongoDB return if no document matches the query criteria?

Easy
208

You are administering a MongoDB 6.0 replica set with three members: a primary and two secondaries. You need to perform a rolling maintenance on the secondaries, which involves restarting each secondary one at a time. Which two actions must you take to ensure that the replica set remains available for writes during the maintenance? (Choose two.)

Hard
209

What is the purpose of the 'OpLog' in a MongoDB Replica Set?

Hard
210

Which member type in a MongoDB replica set is best suited for a geographically distant data center to provide read-only access without influencing elections?

Easy
211

A healthcare analytics team stores patient records in MongoDB. Each record includes a nested array of vital sign readings, and the team frequently queries for patients whose latest blood pressure reading exceeds a threshold. They decide to store each reading as a separate document in a readings collection and reference the patient. Which MongoDB design philosophy does this decision contradict?

Medium
212

What is the consequence of having a replica set with only two nodes and no arbiter?

Medium
213

A MongoDB replica set has three members: a primary and two secondaries. The DBA needs to perform maintenance on the primary node without causing an election that could lead to data loss. The maintenance requires stopping the mongod process for 30 minutes. Which step should the DBA take first to ensure the primary steps down gracefully and a secondary takes over?

Medium
214

Which operator would you use to remove an element from an array field in a document?

Medium
215

A MongoDB DBA observes that a query with filter { status: "active", created_at: { $gte: ISODate("2024-01-01") } } and sort { created_at: -1 } is performing a collection scan. The collection has an index { status: 1, created_at: -1 }. Which of the following best explains why the index is not being used efficiently?

Medium
216

Refer to the exhibit. What is the primary function of the node with _id 2 in this replica set?

Easy
217

Refer to the exhibit. Which MongoDB philosophy is represented by this document structure?

Medium
218

Which THREE components are mandatory architectural parts of every fully functioning MongoDB sharded cluster deployment? Choose 3 answers.

Hard
219

A MongoDB DBA is managing a sharded cluster where the collection 'orders' is sharded on the field 'orderDate' using ranged sharding. The DBA needs to add a new shard to the cluster to handle increasing data volume. After adding the shard, the balancer begins migrating chunks. During this migration, the DBA runs a query that includes 'orderDate' and notices increased latency. What is the most likely reason for the increased latency?

Medium
220

A global e-commerce platform uses MongoDB with a replica set spanning three data centers. The company wants to ensure that a write is acknowledged by a majority of voting members before it is considered successful, even if one data center experiences a network partition. Which write concern should be configured to meet this requirement?

Hard
221

Which feature of MongoDB allows it to maintain data consistency during primary node failure?

Easy
222

Which THREE factors can significantly impact the time taken for a new primary election?

Hard

Frequently asked questions

What does the scenario questions domain cover on the C100DBA exam?
scenario questions questions test whether you can apply the concept in context, not just recognise a definition.
How many questions are in this domain?
This page lists all 222 scenario questions questions in the C100DBA question bank. The actual exam draws from this domain proportionally to its weighting in the official exam blueprint.
What is the best way to practise this domain?
Start with a short focused session (10 questions) to identify gaps, then work through explanations. Repeat with a longer session once the weak areas feel solid.
Can I practise only scenario questions questions?
Yes — the session launcher on this page filters questions to this domain only. Choose any session length for inline explanations and scoring.