MongoDB MCQ Questions - Sharding
This section focuses on "Sharding" in MongoDB. These Multiple Choice Questions (MCQ) should be practiced to improve the MongoDB skills required for various interviews (campus interview, walk-in interview, company interview), placements, entrance exams and other competitive examinations.
1. ______________ is the process of storing data records across multiple machines and it is MongoDB's approach to meeting the demands of data growth
A. Sharding
B. Config Servers
C. Query Routers
D. Projection
View Answer
Ans : A
Explanation: Sharding is the process of storing data records across multiple machines and it is MongoDB's approach to meeting the demands of data growth.
2. Single replica set has limitation of?
A. 10 Nodes
B. 12 Nodes
C. 8 Nodes
D. Infinite Nodes
View Answer
Ans : B
Explanation: Single replica set has limitation of 12 nodes
3. Which of the following is true about why to use Sharding?
A. In replication, all writes go to master node
B. Memory can't be large enough when active dataset is big
C. Vertical scaling is too expensive
D. All of the above
View Answer
Ans : D
Explanation: All of the above statement are true.
4. In production enviroment , how many sharded clusters have?
A. 2
B. 3
C. 4
D. 5
View Answer
Ans : B
Explanation: In production environment, sharded clusters have exactly 3 config servers.
5. What is true about Query Routers?
A. Query routers are basically mongo instances, interface with client applications and direct operations to the appropriate shard.
B. The query router processes and targets the operations to shards and then returns results to the clients.
C. A sharded cluster can contain more than one query router to divide the client request load.
D. All of the above
View Answer
Ans : D
Explanation: All of the above statement are true.
6. Point out the correct statement
A. High query rates can exhaust the CPU capacity of the server
B. Database systems with small data sets and high throughput applications can challenge the capacity of a single server
C. Smaller data sets exceed the storage capacity of a single machine
D. None of the above
View Answer
Ans : A
Explanation: Working set sizes larger than the system’s RAM stress the I/O capacity of disk drives.
7. ____________ scaling adds more CPU and storage resources to increase capacity.
A. Horizontal
B. Vertical
C. Partition
D. All of the above
View Answer
Ans : B
Explanation: When the primary steps down, the mongod closes all client connections.
8. ______________interface with client applications and direct operations to the appropriate shard or shards.
A. Query Executors
B. Query Parsers
C. Query Routers
D. All of the above
View Answer
Ans : C
Explanation: The query router processes and targets operations to shards and then returns results to the clients.
9. Each shard stores ________ data as the cluster grows.
A. less
B. more
C. equal
D. Can not say
View Answer
Ans : A
Explanation: Each shard stores less data as the cluster grows.
10. MongoDB supports sharding through the configuration of a sharded ______
A. shapes
B. clusters
C. sets
D. All of the above
View Answer
Ans : B
Explanation: Sharding reduces the number of operations each shard handles
Discussion