View Full MongoDB C100DBA Exam Dumps and Practice Test Dumps
Question 61
Which setting controls how long MongoDB waits before declaring an unresponsive member unavailable?
- heartbeatIntervalMillis
- electionTimeoutMillis
- heartbeatTimeout
- memberTimeout
Correct Answer: 2
Explanation:
electionTimeoutMillis defines the amount of time a replica set member waits without receiving a valid heartbeat from the primary before initiating an election process. This setting affects how quickly a replica set responds to primary failures. A shorter value can allow faster failover but may increase sensitivity to temporary network interruptions. A longer value provides more tolerance for transient delays but can extend failure detection. DBAs should choose settings carefully based on network reliability and deployment requirements. Replica set heartbeat behavior and election timing work together to maintain availability during member failures.
Question 62
Which MongoDB feature stores encrypted fields so authorized queries can operate on protected data?
- Queryable Encryption
- WiredTiger compression
- Replica encryption
- Journal protection
Correct Answer: 1
Explanation:
Queryable Encryption allows applications to encrypt selected fields while still supporting queries against protected data. Encryption and decryption operations are designed to keep sensitive values protected from unauthorized access while allowing supported query patterns. This differs from encryption at rest, which primarily protects database files stored on disk. Queryable Encryption is particularly relevant for applications handling sensitive information that should remain encrypted beyond storage-level protection. Implementing it requires appropriate application and key-management planning. DBAs should understand supported query capabilities, indexing implications, key handling, and operational requirements before deploying encrypted searchable fields.
Question 63
Which command can reveal whether a query is using an efficient execution plan?
- db.stats()
- db.hostInfo()
- explain()
- db.validate()
Correct Answer: 3
Explanation:
The explain() method provides information about how MongoDB plans and executes a query. Depending on the selected verbosity, it can show the winning plan, examined keys, examined documents, execution statistics, and related planner information. DBAs use this information to determine whether indexes are being used effectively and whether a query is scanning more data than expected. Comparing execution plans before and after index or query changes can help validate performance improvements. Explain output should be interpreted together with realistic workload behavior because a plan that looks efficient for one data distribution may behave differently at larger scale.
Question 64
What does the MongoDB validate command primarily check?
- User privileges
- Collection integrity
- Replica elections
- Network encryption
Correct Answer: 2
Explanation:
The validate command is used to check the integrity of a collection and provide diagnostic information about its data and indexes. It can help administrators investigate suspected storage or data consistency problems. Validation can consume significant resources, especially on large collections, so it should be scheduled carefully on production systems. It is a diagnostic operation rather than a replacement for backups or regular monitoring. When corruption or inconsistency is suspected, DBAs can use validation results alongside logs, storage-engine diagnostics, and backup information to determine the appropriate recovery or remediation procedure.
Question 65
Which index option prevents an index from being considered by the query planner?
- unique
- hidden
- sparse
- partialFilterExpression
Correct Answer: 2
Explanation:
A hidden index remains present and maintained but is excluded from consideration by the query planner. This allows administrators to evaluate the effect of removing an index without immediately dropping it. For example, a DBA can hide an index and monitor query behavior before deciding whether permanent removal is appropriate. Hidden indexes can therefore support safer index maintenance and testing. Because the index continues to consume storage and update resources, hiding it does not eliminate its operational overhead. If workload analysis confirms that the index is unnecessary, it can later be removed explicitly.
Question 66
Which aggregation stage writes pipeline results into an existing collection?
- $facet
- $merge
- $bucket
- $replaceRoot
Correct Answer: 2
Explanation:
The $merge aggregation stage writes pipeline results to a specified collection. It can insert new documents, replace existing documents, or apply other supported behaviors depending on its configuration. This makes $merge useful for maintaining derived collections, materialized reporting data, and incremental processing workflows. Unlike simply returning aggregation results to the client, $merge allows the pipeline itself to persist its output. DBAs should consider write volume, indexing, concurrency, and document-matching behavior when designing pipelines that use $merge, particularly when the destination collection is actively used by applications.
Question 67
Which replica set member type is intended primarily for voting without storing application data?
- Hidden member
- Delayed member
- Arbiter
- Priority-zero secondary
Correct Answer: 3
Explanation:
An arbiter participates in replica set elections by contributing a vote but does not store a copy of the replicated dataset. This makes an arbiter different from ordinary secondary members, which maintain data and can potentially serve read operations when configured for that purpose. Arbiters may be used in specific topologies where an additional voting member is needed without maintaining another full data-bearing server. However, they should be introduced carefully because they provide voting capability without additional data redundancy. Replica set design should prioritize appropriate failure-domain distribution and sufficient data-bearing members for resilience.
Question 68
Which command displays the current replica set configuration document?
- rs.status()
- rs.conf()
- rs.configInfo()
- rs.members()
Correct Answer: 2
Explanation:
rs.conf() returns the replica set configuration currently known to the member. The configuration includes information such as member hosts, priorities, votes, hidden status, and other replica set settings. Administrators use this command when reviewing topology or preparing controlled configuration changes. rs.status() instead reports the current operational state of replica set members. Understanding the distinction between configuration and status is important when troubleshooting elections, replication behavior, or member roles. Before making configuration changes, DBAs should review the existing configuration carefully and ensure that the proposed topology meets availability and operational requirements.
Question 69
What does a sparse index generally omit?
- Documents lacking the indexed field
- Documents containing arrays
- Documents with duplicate values
- Documents larger than limits
Correct Answer: 1
Explanation:
A sparse index generally contains entries only for documents where the indexed field exists. Documents that lack that field are omitted from the index. This can reduce index size and make sparse indexing useful when many documents do not contain the target field. Sparse indexes differ from partial indexes because partial indexes provide a more expressive filtering condition. Administrators should understand how missing fields and query predicates interact with sparse indexes before relying on them for query performance. A sparse index also should not be confused with a unique index, since uniqueness and document inclusion are separate indexing concerns.
Question 70
Which MongoDB command shows replica set replication status?
- rs.conf()
- rs.printReplicationInfo()
- rs.status()
- rs.config()
Correct Answer: 3
Explanation:
rs.status() provides the operational status of replica set members. It includes information about member states, health, synchronization, optime positions, and other replication-related conditions. DBAs commonly use it as a first diagnostic step when investigating replication problems or determining which member currently holds the primary role. rs.conf() focuses on configuration rather than live state. Additional replication helper methods can provide more specialized information, but rs.status() offers a broad operational view. Administrators should examine member health, state transitions, and replication progress together rather than relying on a single field.
Question 71
Which option can reduce the size of WiredTiger data through compression?
- Collection validation
- Storage compression
- Query sampling
- Election tuning
Correct Answer: 2
Explanation:
WiredTiger supports compression of stored data, helping reduce disk-space consumption and potentially improving storage efficiency. Compression can also influence I/O behavior because fewer bytes may need to be read from or written to storage, although CPU resources are required for compression and decompression. The actual benefit depends on the data characteristics, storage system, and workload. DBAs should evaluate both storage savings and CPU impact when selecting compression-related settings. Compression should be considered as part of broader capacity planning rather than as a substitute for appropriate schema design, indexing strategy, or workload optimization.
Question 72
Which command displays server-wide operational counters and resource metrics?
- db.serverStatus()
- db.collectionStats()
- db.queryMetrics()
- db.runtimeInfo()
Correct Answer: 1
Explanation:
db.serverStatus() returns a broad collection of server-level operational metrics. The output can include connections, memory, network activity, operation counters, storage-engine statistics, locks, and other runtime information. DBAs use these metrics to establish baselines and investigate performance changes. Because the output is extensive, monitoring systems often collect selected fields rather than treating every metric equally. Comparing values over time is particularly useful for identifying trends such as connection growth, increased operation rates, or storage pressure. Server-status information complements logs, profiling data, and operating-system monitoring when diagnosing production workloads.
Question 73
Which MongoDB mechanism records operations for recovery after an unexpected shutdown?
- Query planner cache
- Replication heartbeat
- Write-ahead journal
- Collection validator
Correct Answer: 3
Explanation:
MongoDB’s journal records changes so the storage engine can recover recent operations following an unexpected process or system failure. The journal works alongside WiredTiger checkpoints: checkpoints establish persistent storage states, while journal information helps recover changes made after the most recent checkpoint. This mechanism supports durability and crash recovery. Journal behavior is therefore important when evaluating storage performance and recovery characteristics. Administrators should also distinguish journaling from replication because a journal protects local recovery, whereas replication maintains copies of data across multiple members. Both mechanisms address different failure scenarios.
Question 74
Which command provides information about replication lag between members?
- rs.printReplicationInfo()
- rs.showLag()
- rs.replicationLag()
- rs.memberDelay()
Correct Answer: 1
Explanation:
rs.printReplicationInfo() displays information about the oplog and replication window from the perspective of the current member. It can help administrators understand the range of operations available and assess replication timing. This is useful when investigating whether a secondary is keeping up with the primary or when evaluating recovery-point characteristics. It should be interpreted alongside rs.status() and other monitoring information because replication health involves more than a single measurement. Regular monitoring of lag and oplog capacity helps DBAs identify secondaries that may be falling behind or approaching operational limits.
Question 75
Which setting prevents a replica member from voting in elections?
- votes: 0
- priority: 1
- hidden: false
- arbiterOnly: false
Correct Answer: 1
Explanation:
Setting votes: 0 makes a replica set member non-voting. Such a member can still replicate data and perform other supported secondary functions, but it does not contribute to election voting. Non-voting members can be useful in particular topologies where administrators need additional data-bearing members without increasing the voting-member count. Replica set election rules require careful planning because the number and distribution of voting members directly affect fault tolerance. DBAs should also understand that a non-voting member is different from an arbiter: an arbiter votes but does not store replicated data.
Question 76
Which aggregation stage can calculate multiple independent result sets in one pass?
- $limit
- $facet
- $sample
- $count
Correct Answer: 2
Explanation:
The $facet stage allows multiple aggregation pipelines to process the same input documents independently within a single aggregation operation. This is useful for workloads such as generating several dashboard metrics, category counts, or statistical views from one filtered dataset. Each facet produces its own result array in the output document. Because multiple pipelines may process the same input, $facet can require substantial memory and processing resources. Administrators should therefore examine the amount of data entering the stage and place selective filtering stages earlier when appropriate to reduce unnecessary work.
Question 77
Which server setting determines the network interface addresses MongoDB listens on?
- port
- bindIp
- dbPath
- logPath
Correct Answer: 2
Explanation:
The bindIp setting determines which network interfaces or addresses the MongoDB server listens on for incoming connections. Proper configuration is important because binding only to localhost can prevent remote clients from connecting, while exposing MongoDB broadly without suitable network controls can create unnecessary security risk. Administrators should combine bind configuration with firewall rules, authentication, TLS, and appropriate network segmentation. The port setting controls the listening port rather than the interface addresses. Correct network configuration is therefore an important part of both MongoDB connectivity and security administration.
Question 78
Which command can report the amount of oplog information available on a replica set member?
- rs.printReplicationInfo()
- rs.oplogSize()
- db.oplogStats()
- rs.getOplogWindow()
Correct Answer: 1
Explanation:
rs.printReplicationInfo() reports information about the oplog, including timestamps and the approximate replication window available on the member. The oplog is a capped collection that records operations used for replication. The available window is important because a secondary that falls behind beyond the retained oplog range may need to perform an initial synchronization rather than simply catching up from the existing oplog. Monitoring oplog capacity and workload growth is therefore an important DBA responsibility. Adequate oplog sizing should account for write volume and the expected duration of secondary outages or replication delays.
Question 79
Which MongoDB setting enables compatibility behavior for a selected feature version?
- serverCompatibility
- featureCompatibilityVersion
- releaseCompatibility
- storageCompatibility
Correct Answer: 2
Explanation:
featureCompatibilityVersion controls which MongoDB feature set is enabled for a deployment. It is especially important during version upgrades because administrators can upgrade the MongoDB binaries while controlling when newer database features become active. This can provide a transition period for validating application compatibility before enabling newer functionality. DBAs should follow the supported upgrade sequence for their MongoDB version and understand the implications before changing the feature compatibility setting. The setting is not simply a display of the installed binary version; it represents the feature behavior currently enabled by the database.
Question 80
Which MongoDB index property allows duplicate field values?
- unique: true
- sparse: true
- Default non-unique behavior
- hidden: true
Correct Answer: 3
Explanation:
MongoDB indexes are non-unique by default, meaning multiple documents can contain the same indexed value unless a unique constraint is explicitly configured. This is appropriate for common query fields where repeated values are expected, such as status, category, or department. A unique index introduces an additional data-integrity constraint and rejects conflicting duplicate values according to its rules. Options such as sparse and hidden affect which documents are indexed or whether an index is considered by the planner, but they do not inherently make an index unique. Choosing uniqueness should therefore be based on actual application data requirements.