x
1. Which of the following is TRUE about _id field? Select all that apply.
a. _id is autoindexed
b. The datatype of _id needs to be ObjectId
c. _id field needs to be unique across collection
d. _id field need not be unique across a sharded collection
1. For the given document in test collection, which of the following statements is valid to update the value of the field z to 4?
{ _id: 1, y: 3, z : “Apple” }
a. db.test.update( { _id : 1},{ z:4} )
b. db.test.update( { _id : 1}, { $set : { z : 4 } } )
c. db.test.update( { $set : { z : 4 } }, {_id : 1})
d. db.test.update( { z : 4}, {_id:1})
1. Given a compound index { a: 1, b:1, c:1, d:1}, which of the below query would be a covered query?
a. db.test.find({ a : 5, b : 3})
d. db.test.find({ b : 3, c : 2})
c. db.test.find({ b : 3, c : 2, d : 1})
d. db.test.find({ a : 5, b : 1, c : 2})
1. Which of the following write concern should be used to prevent replicaset rollbacks?
a. Unacknowledged
b. Acknowledged
c. Journaled
d. All of the above
2. Which of the following node does NOT participate in election?
a. secondary
b. arbiter
c. hidden
d. slaveDelay
1. In a sharded collection, during migration of documents by the balancer from shard1 to shard2, a find() query on the collection would:
a. be successful on shard1
b. be successful on shard2
c. unsuccessful with acknowledgement
d. successful without acknowledgement
2. Which of the following is not a consideration for an ideal shard key?
a. Shard key should be easily divisible to enable chunks
b. Shard key should be monotonically increasing
c. Shard key should have high degree of randomness
d. Shard key need not always be unique
1. Which of the following is the command to authorize a user “alice” with read and write permission to database called “products”?
a. use products & db.addUser( { user : “alice”, pwd : “12345”, roles : [“readWrite”] } )
b. use admin & db.update( { user : “alice”, pwd : “12345”, db : “products”, role : “readWrite” } )
c. use products & db.authorize( { user : “alice”, pwd : “12345”, roles : [“readWrite”] } )
d. None of the above
2. Which of the following commands returns the counts of various operations (inserts, updates, finds etc) on a mongodb instance?
a. mongotop
b. mongostat
c. serverStatus
d. dbStats
1. Which of the following commands should be used to restore a database that is backed up using mongodump?
a. mongoimport
b. mongodump
c. mongorestore
d. mongoexport
Section 1: Philosophy & Features:
1.
Section 2: CRUD Operations
1.
Section 3: Aggregation Framework
1.
Section 4: Indexing
1.
Section 5: Replication
1.
2.
Section:6 Sharding
1.
2.
Section 7: Server & Application Administration
1.
2.
Section 8: Backup & Restore
1.
Our support doesn't end here. We have monthly newsletters, study guides, practice questions, and more to assist you in upgrading your cloud career. Subscribe to get them all!
Click to Comment