Exam Information
Free practice questions with explanations
MongoDB C100DBA Practice Questions
Answer a question to see the correct answer and the explanation, or click Show answer. Newest questions first.
- Questions
- 15
- Answered
- 0
- Correct
- 0
- Score
- -
-
1 Question 1 Single choice Application Administration
A financial services company runs a MongoDB 7.0 replica set that stores customer account documents. Compliance requires that every read and write of the accounts collection by privileged administrators be recorded, and that audit records must not be stored on the same host as the database data files. The company already enabled SCRAM authentication and role-based access control. Which action best satisfies the audit requirement with the least operational change?
Correct Answer: DExplanationMongoDB Enterprise auditing is configured through the auditLog options, which can direct events to syslog, a JSON file, or the console. Sending events to syslog on a separate host meets the requirement that audit records live off the data host without changing the data path. The profiler only records slow or all operations inside the database itself, so it cannot satisfy the off-host requirement. TLS protects transport but does not produce an audit trail of user actions. Writing the audit file inside dbPath keeps the records on the same host as the data files, which violates the stated constraint.
-
2 Question 2 Single choice CRUD
An e-commerce team runs an inventory update that decrements stock for an item in the inventory collection. Two application servers sometimes process orders for the same SKU at the same moment. The current code reads the document, computes the new quantity in the application, and writes it back with replaceOne, which has occasionally produced negative stock. The team wants the fix to be atomic on the server, avoid transactions, and never allow the quantity to drop below zero. Which approach is best?
Correct Answer: CExplanationA single updateOne is atomic at the document level, and placing the quantity check in the filter means the update only matches when enough stock exists, so the server enforces the non-negative rule with no transaction. Using $inc applies the decrement against the current server value rather than a stale application read. The replaceOne-style approaches reintroduce the read-modify-write race. Write concern affects durability, not whether two concurrent calculations overwrite each other. Snapshot reads in a session do not make a separate write atomic against concurrent writers.
-
3 Question 3 Single choice Indexing and Performance
A logistics platform stores shipment documents in MongoDB 7.0. Each document contains a tags array with between 2 and 40 strings. Queries look like find({tags: 'express', status: 'in_transit'}).sort({eta: 1}), and the team currently has a separate index on tags and another on status and eta. explain() shows the status-eta index being used for the sort while the tags index is used for the match, followed by a fetch and in-memory filter. The team wants one index that supports both the equality filters and the sort. Which index should they create?
Correct Answer: CExplanationBecause tags is an array, the index becomes a multikey index, and MongoDB supports it as long as at most one indexed field is an array in each compound index, which is satisfied here. Ordering the equality fields before the sort field lets the index satisfy both the match and the sort without an in-memory blocking sort. Putting eta descending would not match the ascending sort, so the sort could not use the index. Placing status after tags and eta, or splitting the indexes, forces the sort or filter to fall back to a less selective path.
-
4 Question 4 Single choice Philosophy & Features
A product team is designing a new service that stores product catalog entries. Each entry has nested attributes that differ between product categories, and the team wants to send and receive documents from a JavaScript front end without transformation. They also need dates and 64-bit integers stored without precision loss, and they want to query by a binary identifier efficiently. A colleague proposes storing everything as JSON strings in a text field to simplify the schema. Which statement best describes the correct representation and why the proposal is wrong?
Correct Answer: CExplanationMongoDB stores documents as BSON, which carries types such as Date, Int64, and BinData that plain JSON cannot represent natively. The proposed string field would make dates and integers opaque text, preventing range comparisons on dates and correct numeric ordering. Queries on binary identifiers and typed fields depend on the stored BSON type. Options claiming the server stores JSON or that the wire protocol alone matters misstate the storage model, and extended JSON is only a text serialization that still does not give the server typed storage.
-
5 Question 5 Single choice Replication
A payments company operates a three-member replica set across two data centers, with two members in the primary data center and one in the secondary. A regional outage takes down the primary data center. The surviving member is in the secondary site and cannot be elected primary. The application uses write concern majority and must not lose any acknowledged writes. The company wants service restored quickly without weakening its durability guarantee. What is the best action?
Correct Answer: AExplanationElections require a strict majority of voting members, and with only one of three voting members reachable the set cannot elect a primary. Adding a voting member in the surviving site, when the new member can join and reach a majority, restores the ability to elect a primary while keeping majority writes intact. Forced reconfiguration risks rolling back majority-committed writes, which violates the durability requirement. Changing to w 1 weakens durability, and starting a new replica set would discard the existing data membership and the oplog history.
-
6 Question 6 Single choice Server Administration
A SaaS provider runs MongoDB 7.0 on Linux hosts with the WiredTiger storage engine. Monitoring shows the WiredTiger cache repeatedly reaching its configured limit, with application latency spikes during eviction. The host has 64 GB RAM and the mongod process is not sharing the host with other memory-heavy services. Operations want to reduce memory pressure without restarting the service during business hours, and they have confirmed the working set is roughly 30 GB. Which action is most appropriate?
Correct Answer: BExplanationThe WiredTiger cache size can be changed at runtime through the wiredTigerEngineRuntimeConfig parameter, so a larger cache can be applied without a restart. With 64 GB of RAM and a 30 GB working set, growing the cache to fit the working set is reasonable and removes the eviction pressure. Changing the startup file only takes effect after a restart, which the operations team has ruled out for business hours. Shrinking the cache would worsen eviction. Collection compression reduces on-disk size but does not change the in-memory cache limit that is being hit.
-
7 Question 7 Single choice Sharding
A media company stores viewing events in a sharded cluster. The collection key is a monotonically increasing timestamp, and writes concentrate on a single chunk at the high end of the key range, causing one shard to receive almost all inserts. Queries almost always filter by userId and then by time range. The team wants even write distribution while keeping targeted reads for per-user queries. Which shard key choice best meets both goals?
Correct Answer: CExplanationA compound shard key that begins with userId distributes writes across many user ranges rather than concentrating them at one end of the key space, and the query filter on userId lets mongos target only the relevant shards. Adding timestamp as the second field preserves range ordering within each user. Hashing the timestamp does spread writes but turns time-range queries into scatter-gather operations. Hashing userId gives even writes but cannot route time-range queries to a single chunk, and an ascending userId alone can still create hot spots in certain distributions.
-
8 Question 8 Single choice Application Administration
A healthcare provider must encrypt data at rest for a MongoDB 7.0 Enterprise deployment that holds protected patient records. The security team requires that the encryption keys be managed outside the database hosts and that key rotation can happen without downtime for the database. The team is considering using the Encrypted storage engine with a local keyfile stored on the same volume as the data files. Which proposal best satisfies the requirements?
Correct Answer: DExplanationMongoDB Enterprise encryption at rest can use an external key management service through KMIP, which keeps the master key outside the database hosts and supports rotation of the master key without rewriting the data. A keyfile on the same volume violates the external-key requirement, and restarting every member also conflicts with zero downtime. TLS protects data in transit only. Storing the key in the configuration file on the host exposes it alongside the data and fails the separation requirement.
-
9 Question 9 Single choice Indexing and Performance
A team notices that a MongoDB 7.0 collection of order documents has grown to several hundred million entries. A query that filters on customerId and orderDate finds the right documents, but the index build for a new index on those fields blocks reads and writes on the primary for an extended period during peak hours. The team must add the index without interrupting the service and must keep the change on the primary as the only operational concern. Which approach should they choose?
Correct Answer: AExplanationA rolling index build builds the index one member at a time, taking each member out of service for reads and writes while it builds, then applying the change to the primary last after a stepdown. This keeps the cluster serving traffic throughout. A background build on the primary still runs against live writes and can block operations in some phases, so it does not guarantee uninterrupted service. Building only on a hidden member without a rolling process does not give the same coordinated cutover. Dropping the collection is destructive and far outside the stated constraint.
-
10 Question 10 Multiple choice Server Administration
A retail company runs a MongoDB 7.0 replica set with three members on Linux. The operations team wants to reduce the risk of unplanned downtime from disk exhaustion on the data volume and to confirm the storage settings are safe for production. Which two actions best achieve this goal? (Choose two.)
Correct Answer: C, EExplanationMonitoring free space and alerting before the volume fills addresses exhaustion directly, since mongod does not recover on its own from a full filesystem. Placing the journal on a separate volume means journal writes are not starved by data file growth, which keeps the write-ahead log protected. Disabling journaling removes the local durability guarantee, and replication alone does not replace it. Compact is a blocking maintenance operation that is not a routine nightly fix. Increasing the cache does not reduce disk usage, and it also reduces memory for the operating system.
-
11 Question 11 Multiple choice Replication
A global streaming service runs a replica set that spans three regions. The operations team wants the application to continue writing with strong durability when a single member in the primary region fails, and they want replication to stay fast for readers in the secondary regions. The team has a budget that allows five voting members in total. Which two configurations best meet these goals? (Choose two.)
Correct Answer: A, EExplanationKeeping voting members in the primary region and using non-voting members elsewhere keeps elections local and avoids cross-region latency for voting, while reads are served from nearby members. A five-voting-member layout split two, two, and one across three regions keeps a majority reachable if one region is lost, supporting majority write concern. Placing three voters in one site means losing that site leaves no majority, which is the failure the team wants to survive. A single voter cannot form a majority once it fails. Write concern w 1 weakens durability, contrary to the requirement.
-
12 Question 12 Single choice Philosophy & Features
A team is evaluating whether MongoDB 7.0 suits a new application that combines a flexible product catalog with reporting across customers. The architects value horizontal scaling and fault tolerance but also want a clear path to disaster recovery for accidental data deletion. A colleague claims that because MongoDB uses replication, deleting a collection by mistake can be undone by failing over to a secondary. Which statement correctly evaluates this claim and the recommended response?
Correct Answer: DExplanationReplication faithfully copies a delete to every member, so failover does not undo an accidental drop; the surviving members reflect the deletion. Recovery requires a backup or a delayed secondary configured for that purpose, which is a deliberate design choice. The oplog is bounded and rolls over, so it cannot be relied on to preserve deleted documents. Replica sets do not keep an automatic delayed copy, and deletes replicate from the primary regardless of which member the operator connects to.
-
13 Question 13 Single choice CRUD
A company stores subscription records in a MongoDB 7.0 collection. The application must upsert a subscription when a customer changes plan, and it must not create duplicate records when two requests for the same customer arrive concurrently. The filter uses customerId, which is unique in the collection under a unique index. The current code performs a find followed by an insert when no document is returned, and duplicates occasionally appear. Which change is the best correction?
Correct Answer: DExplanationAn updateOne with upsert set to true performs the existence check and insert as a single server-side operation, and combined with the unique index on customerId, a concurrent second request cannot create a duplicate. Wrapping the find and insert in a transaction does not stop the race under default concerns, and the unique index is what truly enforces uniqueness. Write concern controls durability, not uniqueness. insertMany with ordered false silently allows the first insert but does not implement the upsert semantics the application needs.
-
14 Question 14 Multiple choice Application Administration
An insurance company runs MongoDB 7.0 and must demonstrate that only authorized roles can read claim documents and that database access is logged. The security reviewer is checking the current setup, which uses a single shared administrator account for all operators. Which two actions together best improve the security posture? (Choose two.)
Correct Answer: A, EExplanationIndividual accounts with narrowly scoped built-in roles enforce least privilege and make actions attributable, which replaces the shared administrator account the reviewer objected to. Enabling audit with an authentication filter records logins and authorization failures, satisfying the need for logged access. Read-only for all users breaks legitimate writes. Disabling internal authentication weakens cluster security. Granting dbAdminAnyDatabase to every operator violates least privilege.
-
15 Question 15 Single choice Server Administration
A team operates a MongoDB 7.0 replica set and notices that secondaries occasionally fall far behind the primary during bulk loads, increasing the time before a failover would be safe. They want to diagnose the lag using the server tools that report replication status and the oplog window, without changing any configuration. Which command sequence best provides the information they need?
Correct Answer: DExplanationrs.status() exposes each member's optime and state, so the lag between the primary and secondaries is visible directly, and rs.printReplicationInfo() reports the oplog size and the time span it covers, which tells the team how much lag is survivable. serverStatus connection counts do not describe replication delay. Collection stats describe storage, not replication progress. Reconfiguring priority changes election preference rather than replication throughput, and it is a configuration change the team explicitly wants to avoid.
These are 15 of the 172 questions in the full C100DBA pack.
Get All 172 QuestionsGet all 172 questions & answers
Full access options for MongoDB C100DBA
Self-study
PDF Version
- 172 actual exam questions
- Compatible with all devices
- Printable PDF format
- No download limits
- 90 days free updates
- 24/7 customer support
Best value
Bundle Pack
- Discounted PDF + online access
- 172 actual exam questions
- Both PDF and online practice test
- Free 90 days updates
- No download or practice limits
- 24/7 customer support
Exam simulation
Online Practice Test
- 172 actual exam questions
- Actual exam environment
- 90 days free updates
- Browser-based software
- 24/7 customer support
100% Money Back Guarantee
Your success comes first
At DumpsProvider, we give you a 100% money back guarantee on all of our exam dumps. For us, your success is the #1 priority and we are more than confident that our exam material will help you pass the C100DBA Exam (MongoDB Certified Database Administrator) on your very first attempt.
In a rare case, if you fail your exam, we will refund your amount without asking a single question.