Home
MCQS
MongoDB MCQ Quiz Hub
MongoDB Mcq Question Set 18
Choose a topic to test your knowledge and improve your MongoDB skills
1. The _______ collection holds documents for each tagged shard key range in the cluster.
tags
databases
version
None of the mentioned
2. Split empty chunks in your collection by manually performing the ______ command on chunks.
distrbute
split
change
All of the Mentioned
3. Point out the correct statement.
Pre-splitting the chunk ranges in an empty sharded collection allows clients to insert data into an already partitioned collection
MongoDB cannot create enough chunks or distribute data fast enough to support required throughput
Chunk migration does not require copying all the data in the chunk from one shard to another
All of the Mentioned
4. MongoDB provides the _________ command to combine contiguous chunk ranges into a single chunk.
helpchunks
moveChunks
mergeChunks
All of the Mentioned
5. Use ________ to determine the current chunk ranges across the cluster.
sh.collects()
sh.status()
sh.results()
All of the Mentioned
6. Point out the wrong statement.
If a collection already has data, MongoDB automatically splits the collection’s data when you enable sharding for the collection
Subsequent attempts to manually create splits can lead to unpredictable chunk ranges and sizes as well as inefficient or ineffective balancing behavior
MongoDB creates splits only after an insert operation
None of the mentioned
7. ______ splits the chunk that contains the shard key value specified by the query at the chunk’s median point.
sh.Find()
sh.splitFind()
sh.split()
All of the mentioned
8. _____ splits a chunk at the shard key value specified by the query.
sh.Find()
sh.splitFind()
sh.split()
sh.splitAt
9. sh.splitFind () Splits the chunk that contains the shard key value specified by the query at the chunk’s ______ point.
smean
stdev
median
All of the mentioned
10. The mergeChunks command requires at least _______ empty input chunk.
one
two
three
all of the mentioned
11. The chunkSize and ________ options, passed at startup to the mongos, do not affect the chunk size after you have initialized the cluster.
–Size
–chunkSize
–chunk
none of the mentioned
12. The preferred way to clear the _________ flag from a chunk is to attempt to split the chunk.
boolean
jumbo
change
All of the Mentioned
13. Point out the correct statement.
In some instances, MongoDB cannot split the no-longer jumbo chunk, such as a chunk with a range of single shard key value
To ensure that mongos instances update their cluster information cache, run flushConfig in the admin database
In a sharded cluster, you cannot use tags to associate specific ranges of a shard key with a specific shard or subset of shards
All of the Mentioned
14. ____ is used to remove tags from a particular shard.
sh.removeTag()
sh.removeShard()
sh.removeShardTag()
All of the Mentioned
15. _____ associates a shard with a tag or identifier.
sh.collects()
sh.addShardTag
sh.results()
All of the mentioned
16. Point out the wrong statement.
You cannot overlap defined ranges, or tag the same range more than once
The mongod provides a helper for removing a tag range
The output from sh.status() lists tags associated with a shard, if any, for each shard
None of the mentioned
17. To assign a tag to a range of shard keys use the _________ method when connected to a mongos instance.
sh.addTagRange()
sh.splitFind()
sh.Range()
All of the Mentioned
18. Each document in the tags holds the ________ of the sharded collection and a minimum shard key value.
tag
chunk
namespace
size
19. Which of the following parameter represents minimum value of the shard key range to include in the tag?
min
max
maximum
Minimum
20. Use ________ to ensure that the balancer migrates documents that exist within the specified range to a specific shard.
sh.addShardTag()
sh.addTag()
sh.aShardTag()
All of the Mentioned
21. Which of the following parameter denotes name of the shard from which to remove a tag?
shard
tag
chunk
None of the mentioned
22. ____ runs a database command against the admin database of a mongos instance.
sh._checkFullName()
sh._adminCommand()
sh.getBalancerLockDetails()
All of the Mentioned
23. Point out the correct statement.
The unique constraint on indexes ensures that only one document can have a value for a field in a collection
MongoDB support creating new unique indexes in sharded collections
If you use a compound shard key, you cannot enforce uniqueness on the combination of component keys in the shard key
All of the mentioned
24. ____ tests to see if the mongo shell is connected to a mongos instance.
sh._checkMongos()
sh.addShard()
sh._lastMigration()
All of the Mentioned
25. ____ reports on the active balancer lock, if it exists.
sh._checkFullName()
sh._adminCommand()
sh.getBalancerLockDetails()
All of the Mentioned
26. Point out the wrong statement.
The best way to ensure a field has unique values is to generate universally unique identifiers (UUID,) such as MongoDB’s ‘ObjectId values
Most deployments will not need to shard the files collection
The files collection is typically small, and only contains metadata
None of the mentioned
27. _____ reports on the last chunk migration.
sh._checkMongos()
sh.addShard()
sh._lastMigration()
All of the Mentioned
28. _____ removes an association between a range shard keys and a shard tag.
sh.removeTagRange()
sh._checkMongos()
sh.disableBalancing()
None of the mentioned
29. ______ disable balancing on a single collection in a sharded database.
sh.removeTagRange()
sh._checkMongos()
sh.disableBalancing()
None of the mentioned
30. _____ activates the sharded collection balancer process if previously disabled using sh.disableBalancing().
sh.getBalancerHost()
sh.enableBalancing()
sh.enableSharding()
All of the mentioned
31. _____ returns a boolean to report if the balancer is currently enabled.
sh.getBalancerHost()
sh.enableBalancing()
sh.getBalancerState()
none of the mentioned
32. ____ enables the balancer and waits for balancing to start.
sh.waitForBalancer()
sh.startBalancer()
sh.waitForDLock()
All of the mentioned
33. Point out the correct statement.
sh.deadForDLock() waits for a specified distributed sharded cluster lock
sh.waitForBalancerOff() waits until the balancer stops running
sh.statusserver() reports on the status of a sharded cluster, as db.printShardingStatus()
All of the Mentioned
34. ____ waits for a change in ping state from one of the mongos in the sharded cluster.
sh.waitForBalancer()
sh.startBalancer()
sh.waitForPingChange()
All of the Mentioned
35. ____ forces an update to the cluster metadata cached by a mongos.
config
flushconf
flushRouterConfig
All of the Mentioned
36. Point out the wrong statement.
moveChunks provides the ability to combine chunks on a single shard
setShardVersion is used to set the config server version
shardCollection enables the sharding functionality for a collection, allowing the collection to be sharded
None of the mentioned
37. Which of the following command that validates index on shard key?
checkShardingIndex
checkSIndex
enableSharding
All of the Mentioned
38. Which of the following command is used to determine split points?
splitVector
medianKey
movePrimary
None of the mentioned
39. You can only issue listShards against the ________ database.
local
admin
temp
None of the mentioned
40. ______ is an internal command that supports the sharding functionality.
getBalancerHost()
getShardMap
enableSharding()
All of the Mentioned
41. _____ command verifies that a process is a mongos.
medianKey
isdbgrid
movePrimary
none of the mentioned
42. Which of the following is not a feature for NoSQL databases?
Data can be easily held across multiple servers
Relational Data
Scalability
Faster data access than SQL databases
43. Which of the following statement is correct with respect to mongoDB?
MongoDB is a NoSQL Database
MongoDB used XML over JSON for data exchange
MongoDB is not scalable
All of the above
44. Which of the following is/are feature of mongoDB?
Vertically scalable
Centralised database
c
All of the above
45. Which of the following represent column in mongoDB?
document
database
collection
field
46. The system generated _id field is?
A 12 byte hexadecimal value
A 16 byte octal value
A 12 byte decimal value
A 10 bytes binary value
47. Which of the following true about mongoDB?
MongoDB is a cross-platform
MongoDB is a document oriented database
MongoDB provides high performance
All of the above
48. Collection is a group of MongoDB ______?
Database
Document
Field
none of the above
49. A developer want to develop a database for LFC system where the data stored is mostly in similar manner. Which database should use?
Relational
NoSQL
Both A and B can be used
none of the above
50. Documents in the same collection do not need to have the same set of fields or structure, and common fields in a collection's documents may hold different types of data is known as ?
dynamic schema
mongod
mongo
Embedded Documents
Submit