This set of MongoDB Multiple Choice Questions & Answers (MCQs) focuses on “Cluster Deployment”.
1. The ________ collection stores a document for each change to the metadata of a sharded collection.
a) version
b) changelog
c) settings
d) all of the mentioned
View Answer
Explanation: The config database is internal: applications and administrators should not modify or depend upon its content in the course of normal operation.
2. Point out the correct statement.
a) The local database supports sharded cluster operation
b) The config database is a dependable API, and users should not write data to the config database in the course of normal operation or maintenance
c) Modification of the config database on a functioning system may lead to instability or inconsistent data sets
d) All of the mentioned
View Answer
Explanation: If you must modify the config database, use mongodump to create a full backup of the config database.
3. The _________ collection stores a document for each sharded collection in the cluster.
a) help
b) shards
c) collections
d) all of the mentioned
View Answer
Explanation: Shard keys are immutable and cannot be changed after insertion.
4. You can return a list of the collections, with the following helper ______________
a) show collects
b) show collection
c) show collections
d) all of the mentioned
View Answer
Explanation: To access the config database, connect to a mongos instance in a sharded cluster, and use the following helper: use config.
5. Point out the wrong statement.
a) Database servers store the metadata for a sharded cluster
b) Always back up the config database before doing any maintenance on the config server
c) The mongos instances cache metadata and use it to route read and write operations to shards
d) None of the mentioned
View Answer
Explanation: The metadata reflects state and organization of the sharded data sets and system.
6. ________ is a string that holds the address of the client, a mongos instance that initiates this change.
a) config.changelog.serverAddr
b) config.changelog.clientAddr
c) config.changelog.time
d) all of the mentioned
View Answer
Explanation: config.changelog.time is ISODate timestamp that reflects when the change occurred.
7. The _______ collection keeps track of the active components in the sharded cluster.
a) deploys
b) lockpings
c) locks
d) all of the mentioned
View Answer
Explanation: The locks collection stores a distributed lock.
8. If the collection is empty then MongoDB will create the index as part of the ________
a) shardCollectionkey()
b) shardCollection()
c) keyCollection()
d) all of the mentioned
View Answer
Explanation: MongoDB provides no method to deactivate sharding for a collection after calling shardCollection.
9. Changing the _______ option will change the port that mongod listens for incoming connections on.
a) –shardsrvkey
b) –shardsrv
c) –shard
d) All of the mentioned
View Answer
Explanation: The single-shard cluster is now a non-sharded replica set that will accept read and write operations on the data set.
10. The _____________ collection holds documents for each tagged shard key range in the cluster.
a) tags
b) databases
c) version
d) none of the mentioned
View Answer
Explanation: The version collection holds the current metadata version number.
Sanfoundry Global Education & Learning Series – MongoDB.
Here’s the list of Best Books in MongoDB.
- Practice Programming MCQs
- Check MongoDB Books
- Check Information Technology Books
- Apply for Programming Internship