Sail E0 Webinar

MCQs

Total Questions : 10
Question 1. The update() method uses the _______ command, which uses the default write concern.
  1.    find
  2.    read
  3.    update
  4.    modify
 Discuss Question
Answer: Option C. -> update


The update() method returns an object that contains the status of the operation.


Question 2. If the collection is empty then MongoDB will create the index as part of the ________.
  1.    shardCollectionkey()
  2.    shardCollection()
  3.    keyCollection()
  4.    All of the mentioned
 Discuss Question
Answer: Option B. -> shardCollection()


MongoDB provides no method to deactivate sharding for a collection after calling shardCollection.


Question 3. _________ reports on the last chunk migration.
  1.    sh._checkMongos()
  2.    sh.addShard()
  3.    sh._lastMigration()
  4.    All of the mentioned
 Discuss Question
Answer: Option C. -> sh._lastMigration()


The sh._lastMigration() method returns a document with details about the last migration performed on the database or collection.


Question 4. Point out the wrong statement :
  1.    moveChunks provides the ability to combine chunks on a single shard
  2.    setShardVersion is used to set the config server version
  3.    shardCollection enables the sharding functionality for a collection, allowing the collection to be sharded
  4.    None of the mentioned
 Discuss Question
Answer: Option D. -> None of the mentioned


For a sharded collection, mergeChunks combines contiguous chunk ranges on a shard into a single chunk.


Question 5. Point out the wrong statement :
  1.    To create splits, MongoDB does migrate any data or affect the shards
  2.    The addition of new data or the addition of new servers can result in data distribution imbalances within the cluster
  3.    The balancer can run from any of the query routers in a cluster
  4.    All of the mentioned
 Discuss Question
Answer: Option A. -> To create splits, MongoDB does migrate any data or affect the shards


The balancer is a background process that manages chunk migrations.


Question 6. __________ splits the chunk that contains the shard key value specified by the query at the chunk's median point.
  1.    sh.Find()
  2.    sh.splitFind()
  3.    sh.split()
  4.    All of the mentioned
 Discuss Question
Answer: Option B. -> sh.splitFind()


sh.splitFind() creates two roughly equal chunks.


Question 7. A _________ key is either an indexed field or an indexed compound field that exists in every document in the collection.
  1.    cluster
  2.    shard
  3.    partition
  4.    All of the mentioned
 Discuss Question
Answer: Option B. -> shard


Sharding partitions a collection's data by the shard key.


Question 8. To assign a tag to a range of shard keys use the _________ method when connected to a mongos instance.
  1.    sh.addTagRange()
  2.    sh.splitFind()
  3.    sh.Range()
  4.    All of the mentioned
 Discuss Question
Answer: Option A. -> sh.addTagRange()


You may delete tag assignment from a shard key range by removing the corresponding document from the tags collection of the config database.


Question 9. _______ scaling adds more CPU and storage resources to increase capacity.
  1.    Horizontal
  2.    Vertical
  3.    Partition
  4.    All of the mentioned
 Discuss Question
Answer: Option B. -> Vertical


When the primary steps down, the mongod closes all client connections.


Question 10. The source shard is responsible for incoming ______ operations for the chunk.
  1.    read
  2.    write
  3.    read-write
  4.    All of the mentioned
 Discuss Question
Answer: Option B. -> write


During the migration process, operations to the chunk route to the source shard.


Latest Videos

Latest Test Papers