Limited-Time Offer: Enjoy 50% Savings! - Ends In 0d 00h 00m 00s Coupon code: 50OFF
Welcome to QA4Exam

Free practice questions with explanations

MongoDB C100DBA Dumps 2026 with Free Practice Questions and Answers

15 original practice questions for the MongoDB Certified Database Administrator exam, each with an answer and explanation.

Exam topics: Indexing And Performance, Replication, Application Administration, CRUD and 3 more.

Formats: single answer, dropdown, multiple answers, order list and drag and drop. A new question is added every 15 days.

C100DBA Practice Set Details

Vendor
MongoDB
Exam Code
C100DBA
Questions On This Page
15
Exam Topics Covered
7 of 7
Question Types
5
Newest Question
New Question
Every 15 days
Full Question Set
172
Certification
MongoDB Certifications
15 questions

MongoDB C100DBA Exam Questions and Answers by Topic

Philosophy & Features

1 practice question on this topicWhat this topic covers

Question 1

Added

Single Answer

A telemetry service ingests measurements from many producers into MongoDB 7.0. Producers can arrive out of order, while analysts most often request the latest measurements for a device over a time range. The collection is expected to grow rapidly, and administrators want MongoDB's time-series storage optimizations rather than manually maintaining bucket documents. Events include a timestamp, device identifier, and varying measurement fields. Which collection design best matches these requirements?

Correct answer: A

A time-series collection is designed for measurements organized by time, and a stable device identifier is appropriate metadata for grouping measurements. A capped collection's insertion-order behavior does not provide the required time-range model and has fixed-size retention semantics. An unbounded per-device array grows toward document-size and update-cost problems. A clustered collection is not a substitute for the time-series collection model, and device identifier is not a timestamp field.

CRUD

2 practice questions on this topicWhat this topic covers

Question 2

Added

Multiple Answers

An order-processing collection contains one document per customer order. A client retries a request after a network timeout, and the same request must not create duplicate orders. The client supplies a globally unique request token, but the application must still permit multiple distinct orders for the same customer. Existing documents have no request-token field; new writes can be changed immediately, while historical documents will be backfilled in a controlled job. Which two actions together provide the required idempotency without preventing legitimate orders? (Choose two.)

Correct answer: C, D

The unique request-token index makes token reuse impossible across orders, and an upsert filtered by that token with $setOnInsert makes a retry find the original order rather than create another. A compound customer-and-token index allows the same token under different customers, contrary to global uniqueness. Filtering only by customer can overwrite a legitimate earlier order. Unordered insert errors do not reliably prove that the particular retry corresponds to an already-created order.

Question 3

Added

Single Answer

A support application updates a customer's preferred language by customerId. It must create a customer document when none exists, preserve all unrelated fields when one does exist, and avoid replacing the entire document from a partial request payload. The request includes a lastUpdated timestamp, and the database has an index on customerId. Which operation best matches these semantics?

Correct answer: D

updateOne with $set changes only the requested fields and upsert true inserts a document if no customer matches. The customerId index supports locating the target efficiently. replaceOne discards fields absent from the partial payload. updateMany can affect multiple matches and $unset removes the language rather than setting it. Deleting and reinserting creates a gap, risks losing unrelated fields, and is not atomic as a combined operation.

Indexing and Performance

3 practice questions on this topicWhat this topic covers

Question 4

Added

Single Answer

A collection stores one document per device. A frequent query filters on tenantId and status, sorts by updatedAt descending, and returns only deviceId and updatedAt. Measurements show that the current query scans many documents because it has only a single-field index on tenantId. Tenant and status equality predicates are both selective, and the collection is large enough that avoiding document fetches matters. Writes are frequent, so the team wants one index rather than several overlapping indexes. Which index is the best fit?

Correct answer: A

The compound index places the equality fields first, then the descending sort field, and includes deviceId so the requested projection can be covered. Starting with updatedAt does not follow the most useful equality-prefix arrangement for this workload. Placing status after the sort field can interfere with efficiently satisfying the requested sort across status values. The shorter index lacks both the sort key and projected deviceId, so it cannot avoid the extra sorting or document fetches.

Question 5

Added

Order List

A 7.0 replica set has a large collection receiving steady writes. A new index is required for an application release, and the administrator must verify that it is usable on every voting data-bearing member before routing the new query workload. Arrange the operational steps in the order they should be performed.

Drag the steps into the correct order, or use the arrows.

  1. Deploy the application query that depends on the index.
  2. Confirm the index is present and ready on each required data-bearing member.
  3. Issue createIndexes for the required index on the collection.
  4. Wait for the index build to complete on the primary and commit through replication.
Correct answer:
  1. Issue createIndexes for the required index on the collection.
  2. Wait for the index build to complete on the primary and commit through replication.
  3. Confirm the index is present and ready on each required data-bearing member.
  4. Deploy the application query that depends on the index.

The index must be created before it can build and replicate. In replica sets, index builds are coordinated and completion depends on the build and its replication/commit process. The administrator should verify readiness on the intended members before deploying queries that rely on it. Deploying the query first risks plans that cannot use the index, while checking readiness before issuing the build is premature.

Question 6

Added

Single Answer

A collection has a multikey index on tags and a separate index on createdAt. A dashboard query filters for one tag, constrains createdAt to a recent range, and sorts by createdAt. The planner frequently chooses one index and applies the other predicate as a residual filter, causing excessive document examination. The query does not need an array sort and tags contains multiple values in many documents. What is the most appropriate index design to evaluate for this query?

Correct answer: D

A compound index beginning with the tag equality predicate and followed by createdAt can combine filtering with the requested time ordering, subject to normal multikey index constraints and plan validation. A multikey field does not have a universal rule that it must be last; the proposed ordering in B is not inherently required and can be less suitable for the equality-plus-sort pattern. Compound multikey indexes cannot freely index multiple array-valued fields in the same document. A hashed index cannot support a range or the requested sort.

Server Administration

2 practice questions on this topicWhat this topic covers

Question 7

Added

Single Answer

A self-managed MongoDB 7.0 server is approaching its filesystem capacity. The data directory contains the database files, and the system has a separate, larger mounted volume that the operations team can use during a scheduled maintenance window. The team cannot accept data loss, cannot copy a live data directory while mongod is writing to it, and must preserve file ownership and permissions. Which procedure is the safest operational choice?

Correct answer: C

A clean shutdown provides a consistent on-disk state for moving the data files. Preserving ownership and permissions and updating storage.dbPath before restarting lets mongod open the moved deployment, after which validation confirms successful startup and data access. Changing the path while the process is running does not relocate its active storage. Two processes must not share the same deployment identity and copied live files are inconsistent. Deleting journal files and moving active database files risks corruption and data loss.

Question 8

Added

Dropdown

A MongoDB 7.0 administrator is preparing a configuration file for a server that should accept connections only on a private interface and should store data under a designated mount point. Complete the YAML settings using the correct configuration keys and values.

Choose the correct value for each blank.

net:
bindIp:
storage:
: /srv/mongodb/data
Correct answer:

net:
bindIp: 10.20.5.12
storage:
dbPath: /srv/mongodb/data

Setting bindIp to the private interface address limits the listener to that interface rather than exposing the service on every interface or restricting it to localhost. MongoDB's storage configuration key for the database files is dbPath. Binding to 0.0.0.0 would expose the listener on all interfaces, while localhost would prevent remote application hosts from connecting. directory and dataPath are not the configuration keys for MongoDB's data directory.

Application Administration

2 practice questions on this topicWhat this topic covers

Question 9

Added

Single Answer

A financial services team runs MongoDB 7.0 on self-managed infrastructure. A regulator requires a record of database-level administrative actions, including successful and failed authentication attempts, but the audit trail must not include routine application reads because of volume and storage cost. The security team already has a protected destination for MongoDB audit output, and all application accounts authenticate with SCRAM. Which audit configuration best meets the requirement while limiting audit volume?

Correct answer: D

A targeted audit filter can capture authentication activity and administrative authorization actions without recording every routine read, keeping the output aligned with the regulator's scope. Auditing all operations creates unnecessary volume and cost. Auditing only successful authorization omits failures, and server authentication logs are not a substitute for the required audit events. Profiling records operation performance details, not a complete, policy-focused security audit trail.

Question 10

Added

Multiple Answers

A deployment hosts two applications in the same database. One service should only read the inventory collection; the other may read and update inventory but must never drop collections or administer users. Credentials are currently shared, and the security review requires least privilege with separate identities. Which two changes meet the requirement? (Choose two.)

Correct answer: A, D

Separate users provide distinct identities for auditing and credential management. The reader's read role permits reads without writes, while readWrite gives the writer the requested data access without granting user administration or broader database administration. Shared readWrite credentials cannot enforce least privilege. Different authentication mechanisms do not create separate identities or distinct authorization. dbAdmin is broader than needed and is not a read-only application role.

Replication

3 practice questions on this topicWhat this topic covers

Question 11

Added

Single Answer

A three-member replica set spans two data centers: the primary and one secondary are in the primary site, while the third member is in a recovery site. The recovery-site member must remain eligible to become primary during a site failure, but it must not take part in elections during normal operation. The two local members should retain normal voting behavior. Which configuration best satisfies both requirements?

Correct answer: D

A priority of 0 prevents the recovery member from becoming primary and therefore keeps it out of the normal election candidate set, while its vote allows it to participate in elections and potentially help establish a majority during a site failure. Setting votes to 0 removes that benefit. A higher priority makes it more favored, not less. Hidden status controls visibility to clients and does not by itself prevent a member from being elected.

Question 12

Added

Dropdown

An application writes records to a replica set and must wait until the write has been applied on a majority of voting members before reporting success. The deployment uses the standard replica-set majority definition, and the application does not require every member to acknowledge. Complete the write concern document with the appropriate values.

Choose the correct value for each blank.

{ w: , j: }
Correct answer:

{ w: "majority", j: true }

The majority write concern waits for acknowledgement from a majority of voting members, and j: true explicitly requests journal acknowledgement as well. A fixed count of 2 is not the replica-set majority abstraction and can become unsuitable as membership changes. The value all is not a supported write concern mode. Setting j to false fails the stated requirement to wait for journal acknowledgement.

Question 13

Added

Order List

An administrator needs to add a new data-bearing member to an existing replica set. The host is reachable and MongoDB is installed, but the member must be initialized from the current set and become a healthy secondary before it is used for read traffic. Arrange the steps in the correct order.

Drag the steps into the correct order, or use the arrows.

  1. Enable the intended read preference for clients that may use the member.
  2. Allow initial synchronization to complete and verify SECONDARY state.
  3. Configure the new mongod with the replica-set name and a unique dbPath.
  4. Add the new member to the replica set configuration from the primary.
Correct answer:
  1. Configure the new mongod with the replica-set name and a unique dbPath.
  2. Add the new member to the replica set configuration from the primary.
  3. Allow initial synchronization to complete and verify SECONDARY state.
  4. Enable the intended read preference for clients that may use the member.

The new process must first be configured with the set name and its own storage path so it can join safely. The primary then adds it to the replica-set configuration, which allows initial synchronization to begin. The administrator verifies that synchronization completes and the member reaches SECONDARY before allowing clients to route reads to it. Enabling read routing earlier can direct requests to a member that is not yet ready.

Sharding

2 practice questions on this topicWhat this topic covers

Question 14

Added

Drag And Drop

A company is selecting a shard key for a large collection accessed by tenant and event identifier. Its top priority is distributing inserts evenly because event identifiers are monotonically increasing; queries by tenant are common, and some tenant-scoped range queries should target a subset of shards. Match each workload requirement to the shard-key strategy that best addresses it.

Drag each item onto its matching target. On a phone: tap an item, then tap a target.

Support tenant-scoped event ranges while retaining tenant locality
Evenly distribute monotonically increasing event inserts
Keep tenant equality queries targeted by tenant
Compound ranged tenant and event key
Ranged tenant identifier
Hashed event identifier
Correct answer:
  • Evenly distribute monotonically increasing event inserts → Hashed event identifier
  • Keep tenant equality queries targeted by tenant → Ranged tenant identifier
  • Support tenant-scoped event ranges while retaining tenant locality → Compound ranged tenant and event key

Hashing a monotonically increasing event identifier spreads inserts across the key space, reducing the hot-shard risk associated with an increasing ranged key. A ranged tenant identifier supports targeting tenant equality queries when the tenant value is present. A compound ranged tenant-and-event key can support tenant-local range targeting, though it does not provide the same uniform insert distribution as hashing the increasing event value.

Question 15

Added

Single Answer

A sharded collection stores documents with a monotonically increasing sequence field. Inserts arrive continuously at high volume, and the current ranged shard key routes new inserts to the chunk containing the greatest values, saturating one shard despite otherwise balanced storage. Most reads are by exact sequence value; range scans are uncommon, and the application can tolerate scatter-gather for those scans. The team wants to retain sequence equality lookups while distributing inserts broadly. What is the best shard-key change?

Correct answer: B

A hashed sequence shard key distributes monotonically increasing values across the hash space, avoiding the single high-value chunk that concentrates inserts. Exact equality lookups can still target the shard owning the hashed value, while range queries lose the efficient contiguous range targeting of a ranged key. Changing the balancer window does not remove the monotonically increasing insert hotspot. A timestamp is also increasing, and a low-cardinality status field creates too few distinct key values for effective distribution.

More Practice Questions

Get the Full MongoDB C100DBA Dumps as PDF and Practice Test

15 questions are free on this page and the full set has 172. It comes as a PDF and an online practice test, with 90 days of free updates.