MongoDB C100DBA Practice Test Questions and Exam Dumps Part19 Q361-380

View Full MongoDB C100DBA Exam Dumps and Practice Test Dumps

 

Question 361

Which command displays available databases and their sizes?

  1. listDatabases
  2. showDatabaseInfo
  3. databaseList
  4. getDatabaseSizes

Correct Answer: 1

Explanation:

The listDatabases command returns information about databases available on a MongoDB deployment, including database names and size-related information. It is commonly used by administrators when reviewing database inventory or checking storage usage. The command can be executed through the admin database and supports options that control the information returned. Access to database information can depend on the privileges of the requesting user. showDatabaseInfo, databaseList, and getDatabaseSizes are not standard MongoDB database commands. Administrators can combine this command with other monitoring methods when investigating overall database storage.

Question 362

Which helper switches the current database context?

  1. db.switch()
  2. db.getSiblingDB()
  3. db.changeDatabase()
  4. db.useDatabase()

Correct Answer: 2

Explanation:

The db.getSiblingDB() helper provides access to another database without requiring the shell’s current db variable to be permanently changed in the same way as the use shell helper. For example, an administrator can use db.getSiblingDB(“analytics”) to obtain a database object representing the analytics database. This is particularly convenient inside scripts where several databases need to be accessed programmatically. db.switch(), db.changeDatabase(), and db.useDatabase() are not standard MongoDB shell helpers for obtaining another database object.

Question 363

Which command returns a hash of collection data for comparison?

  1. collectionHash
  2. dataDigest
  3. dbHash
  4. databaseChecksum

Correct Answer: 3

Explanation:

The dbHash command calculates hashes for collections in a database and can be useful for comparing data consistency between MongoDB databases under appropriate conditions. Administrators can use the resulting information as part of diagnostic investigations when determining whether corresponding collections contain equivalent data. The command should not be treated as a general-purpose cryptographic backup or integrity mechanism. collectionHash, dataDigest, and databaseChecksum are not the standard MongoDB command names for this functionality. Because hashing can involve reading collection data, administrators should also consider its potential resource impact on busy systems.

Question 364

Which command retrieves diagnostic data from a MongoDB server?

  1. diagnosticInfo
  2. getDiagnosticData
  3. serverDiagnostics
  4. collectDiagnostics

Correct Answer: 2

Explanation:

The getDiagnosticData command retrieves diagnostic information maintained by MongoDB’s diagnostic data collection mechanisms. This information can help administrators and support teams investigate server behavior, resource usage, and operational problems. It complements other monitoring commands by providing diagnostic context that may be useful when examining historical or current server conditions. Diagnostic information should be interpreted alongside workload, logs, and other operational metrics rather than as a standalone performance diagnosis. diagnosticInfo, serverDiagnostics, and collectDiagnostics are not the standard MongoDB command names for retrieving this diagnostic dataset.

Question 365

Which replica-set command starts a new replica set?

  1. replSetInitiate
  2. replSetStart
  3. initializeReplicaSet
  4. createReplicaSet

Correct Answer: 1

Explanation:

The replSetInitiate command initializes a new replica set using a supplied replica-set configuration. Before initialization, MongoDB instances intended to participate in the replica set must be configured appropriately, including the replica-set name. After initialization, members can participate in elections and replication according to the configuration. The command is generally executed against one member during the initial setup process. replSetStart, initializeReplicaSet, and createReplicaSet are not the standard MongoDB command names for initializing a replica set.

Question 366

Which command changes a member’s synchronization source?

  1. replSetChangeSource
  2. replSetSyncFrom
  3. replSetSource
  4. replSetFollow

Correct Answer: 2

Explanation:

The replSetSyncFrom command requests that a replica-set member change the member from which it synchronizes data. This can be useful when an administrator needs to influence replication topology, such as directing a secondary toward a suitable nearby or less-loaded source. MongoDB also applies its own rules when selecting eligible sync sources, so the requested source must satisfy the relevant requirements. The command should be used carefully in production because synchronization choices can affect replication performance and topology behavior. replSetChangeSource, replSetSource, and replSetFollow are not standard MongoDB commands.

Question 367

Which command returns a replica-set member’s rollback identifier?

  1. replSetRollbackId
  2. replSetHistoryId
  3. replSetGetRBID
  4. replSetRecoveryId

Correct Answer: 3

Explanation:

The replSetGetRBID command returns the rollback identifier, commonly called the RBID, for a replica-set member. The identifier can help determine whether a rollback-related state change has occurred when monitoring or troubleshooting replication behavior. It is a specialized administrative command rather than a routine application operation. Administrators investigating replication consistency may use it together with replica-set status and log information to understand member history. replSetRollbackId, replSetHistoryId, and replSetRecoveryId are not the standard MongoDB command names for retrieving the rollback identifier.

Question 368

Which replica-set command temporarily places a member into maintenance mode?

  1. replSetPause
  2. replSetMaintenance
  3. replSetDrain
  4. replSetStandby

Correct Answer: 2

Explanation:

The replSetMaintenance command places a replica-set member into maintenance mode. Maintenance mode can affect how the member participates in replica-set activity and is intended for specific administrative situations rather than normal workload management. Administrators should understand the consequences before using it, especially on production members where availability and replication behavior matter. The command is different from permanently changing replica-set membership or stopping the MongoDB process. replSetPause, replSetDrain, and replSetStandby are not the standard MongoDB command names for placing a member into maintenance mode.

Question 369

Which command requests an immediate checkpoint-related storage operation?

  1. fsync
  2. forceCheckpoint
  3. syncStorage
  4. flushStorage

Correct Answer: 1

Explanation:

The fsync command requests that MongoDB flush pending writes to disk. Historically, it has been used in administrative and backup-related workflows, although administrators must understand the storage engine and deployment implications before using it. The command should not be confused with normal application write acknowledgment because its purpose is associated with flushing data to storage. In modern MongoDB environments, backup mechanisms designed for the deployment are generally preferred over ad hoc storage operations. forceCheckpoint, syncStorage, and flushStorage are not the standard MongoDB command names corresponding to this operation.

Question 370

Which security option specifies the authentication database?

  1. authDatabase
  2. authenticationSource
  3. authSource
  4. loginDatabase

Correct Answer: 3

Explanation:

The authSource connection option specifies the database against which MongoDB authenticates the supplied user credentials. This is important because the database containing a user’s authentication credentials does not always have to be the same database containing the application’s data. For example, a user can authenticate against the admin database while accessing collections in another database, provided the user’s authorization permits that access. authDatabase, authenticationSource, and loginDatabase are not the standard MongoDB connection-string option names for selecting the authentication source.

Question 371

Which option specifies additional authentication mechanism properties?

  1. authMechanismProperties
  2. authOptions
  3. mechanismSettings
  4. authenticationParameters

Correct Answer: 1

Explanation:

The authMechanismProperties connection option supplies additional properties used by supported MongoDB authentication mechanisms. These properties can influence authentication behavior beyond the basic mechanism name and credentials. The exact supported properties depend on the authentication mechanism and MongoDB driver. Administrators should therefore consult the relevant driver documentation when configuring mechanism-specific options. authOptions, mechanismSettings, and authenticationParameters are not the standard MongoDB connection-string option name for this purpose. Proper configuration is particularly important when integrating MongoDB authentication with enterprise identity systems.

Question 372

Which setting permits TLS connections with invalid hostnames?

  1. tlsIgnoreHostname
  2. tlsAllowInvalidHostnames
  3. tlsSkipHostnameCheck
  4. tlsRelaxIdentity

Correct Answer: 2

Explanation:

The tlsAllowInvalidHostnames setting allows MongoDB TLS connections even when the hostname does not match the hostname information presented by the server certificate. This weakens normal certificate hostname verification and therefore should be used cautiously, generally only in controlled testing or exceptional administrative circumstances. Production TLS configurations should normally preserve proper certificate validation. tlsIgnoreHostname, tlsSkipHostnameCheck, and tlsRelaxIdentity are not the standard MongoDB configuration option names for this behavior. Disabling hostname validation can reduce protection against certain man-in-the-middle scenarios.

Question 373

Which setting selects the operating system’s trusted CA store?

  1. tlsSystemTrust
  2. tlsUseSystemCA
  3. tlsOperatingCA
  4. tlsDefaultTrust

Correct Answer: 2

Explanation:

The tlsUseSystemCA option allows MongoDB to use the operating system’s trusted certificate authority store for TLS certificate verification where supported. This can simplify certificate management when an organization’s trusted CA certificates are already installed in the system trust store. It can also reduce the need to maintain a separate CA file for every MongoDB connection. The exact availability and behavior depend on the MongoDB version, platform, and driver. tlsSystemTrust, tlsOperatingCA, and tlsDefaultTrust are not the standard MongoDB option names for using the system CA store.

Question 374

Which option selects a client certificate from the system certificate store?

  1. tlsCertificateSelector
  2. tlsClientSelector
  3. tlsCertificateSource
  4. tlsIdentitySelector

Correct Answer: 1

Explanation:

The tlsCertificateSelector option can be used to select a client certificate from the operating system certificate store when supported by the MongoDB client environment. This is useful in deployments where certificates are centrally managed rather than stored directly in PEM files. Certificate selection criteria identify the appropriate certificate and associated private key for TLS client authentication. Support and syntax depend on the platform and driver being used. tlsClientSelector, tlsCertificateSource, and tlsIdentitySelector are not the standard MongoDB connection option names for selecting a certificate from a system store.

Question 375

Which aggregation expression calculates a percentile from values?

  1. $quantile
  2. $percentile
  3. $distributionPercent
  4. $percentileValue

Correct Answer: 2

Explanation:

The $percentile aggregation expression is used to calculate specified percentile values from a set of numeric data. Percentile analysis helps administrators and developers understand distributions beyond simple averages. For example, a high percentile can reveal how extreme values behave for performance measurements or transaction durations. MongoDB’s percentile functionality is designed for analytical aggregation and may use approximation depending on the supported calculation method. $quantile, $distributionPercent, and $percentileValue are not the standard MongoDB expression names for this calculation.

Question 376

Which aggregation accumulator identifies the bottom-ranked item?

  1. $bottom
  2. $lowest
  3. $minimumItem
  4. $bottomValue

Correct Answer: 1

Explanation:

The $bottom accumulator returns the bottom document according to a specified sort order. It is useful when an aggregation needs to identify the lowest-ranked record within a group based on one or more sorting criteria. Unlike $min, which focuses on a scalar minimum value, $bottom can return a document or structured result associated with the selected sort position. This makes it valuable for analytical reports that need the complete record corresponding to the lowest-ranked result. $lowest, $minimumItem, and $bottomValue are not standard MongoDB accumulator names.

Question 377

Which index feature permits language-aware comparisons?

  1. Text weighting
  2. Collation support
  3. Token normalization
  4. Linguistic indexing

Correct Answer: 2

Explanation:

Collation support allows indexes to follow specified language-aware string comparison rules. A collation can influence ordering and equality behavior according to settings such as locale and comparison strength. When an index is created with a particular collation, queries generally need compatible collation behavior to take advantage of that index for string comparisons. This is different from text search indexing, which is designed around tokenized text-search behavior. Text weighting, token normalization, and linguistic indexing are not the standard MongoDB index feature names for locale-sensitive string comparison.

Question 378

Which command reports collection validation configuration?

  1. validationInfo
  2. getValidationRules
  3. collModStatus
  4. listValidation

Correct Answer: 1

Explanation:

The validationInfo command is not a standard standalone MongoDB command for retrieving collection validation configuration; therefore this question requires careful distinction between collection metadata and command behavior. MongoDB collection validation settings are generally inspected through collection metadata and related administrative interfaces rather than a generic validationInfo command. For certification preparation, administrators should understand that validation configuration includes the validator, validation level, and validation action. The other options listed are also not standard MongoDB command names. This illustrates why command names should be verified against the MongoDB version being administered.

Question 379

Which storage command can compact collection data?

  1. compact
  2. shrinkCollection
  3. compressCollection
  4. repackCollection

Correct Answer: 1

Explanation:

The compact database command can rewrite and compact collection data, depending on the storage engine and MongoDB version. It is an administrative operation that can require significant resources and may have operational restrictions, so it should not be treated as a routine performance command. Administrators should verify current storage-engine behavior and availability before using it in production. Modern WiredTiger deployments have storage management characteristics that differ from older MongoDB storage engines. shrinkCollection, compressCollection, and repackCollection are not the standard MongoDB command names for this operation.

Question 380

Which command reports server build and version metadata?

  1. serverVersion
  2. buildInfo
  3. versionInfo
  4. getBuildData

Correct Answer: 2

Explanation:

The buildInfo command returns information about the MongoDB server build, including version and build-related metadata. Administrators can use it when verifying software versions, diagnosing compatibility issues, or documenting deployment characteristics. The command can also expose information about the build environment and compiled components supported by the server. This makes it useful when troubleshooting behavior that may depend on MongoDB version differences. serverVersion, versionInfo, and getBuildData are not the standard MongoDB command names for retrieving server build information.