EMT Practice Test

1. Question Content...


Question List

Question1: Which of the following are common uses of the mongo shell? Check all that apply

Question2: Which format/standard is used by MongoDB internally to store documents?

Question3: You have designed a web application with mongoDB. You have configured replication. The replica set is in place and function properly. What happens in case of failure?

Question4: Which of the following command is used to get all the indexes on a collection?

Question5: Which of the following about Capped Collections is correct?

Question6: What is the maximum size of a MongoDB document

Question7: Consider the following example document from the sample collection. All documents in this collection have the same schema.

Which of the following queries will replace this with the document.

Question8: Consider that the posts collection contains an array called ratings which contains ratings given to the post by various users in the following format:

Which of the following query will return all the documents where the ratings array contains elements that in some combination satisfy the query conditions?

Question9: Consider that you have a collection called population which has fields state and city. Which of the following query will calculate the population grouped by state and city?

Question10: The MongoDB explain() method does not support which of the following verbosity mode:

Question11: What tool do you use if you want to extract a CSV from mongo?

Question12: In a replica set, a_________number of members ensures that the replica set is always able to select a primary.

Question13: What does the following aggregate query perform?

Question14: Which of the following index would be optimum for the query?
Select all valid. db.test.find( { a : 5, c : 2 })

Question15: Which operations add new documents to a collection?

Question16: Which of the following operators is used to updated a document partially?

Question17: Which is the default mode in which the explain() command runs?

Question18: What is the first task that a secondary would perform on being prompted by another secondary for an election?

Question19: In order to ensure that you can maintain high availability in the face of server failure, you should implement which of the following?

Question20: Which option should be used to update all the documents with the specified condition in the MongoDB query?

Question21: The oplog (operations log) is a special capped collection that keeps a rolling record of all operations that modify the data stored in your databases. All the replica set members contain a copy of the oplog in the following collection:

Question22: Which node in a replica set does accept write operation?

Question23: Consider the following document from the products collection:

What does the following query using $elemMatch return? db.products.find( { product_code: "345678" }, { variations: { $elemMatch: { size: ^L^ } } } )

Question24: We can insert multiple documents in bulk using which of the following operations:

Question25: Consider the following posts document:

Which of the following queries will return the documents but with only the first two tags in the tags array?

Question26: Write the command(s) are correct to enable sharding on a database "testdb" and shard a collection "testCollection" with _id as shard key.

Question27: What is the maximum size of Index Key Limit and Number of Indexes per collection?

Question28: Consider the following documents:

You perform the following query;

How many documents will be updated by the query?

Question29: What does the output x of the following MongoDB aggregation query result into; db.posts.aggregate( [ {
$group: { _id; "$author", x: { $sum: $likes } } } ] )

Question30: Which of the following is correct about MongoDB?

Question31: Below is a sample document of "orders" collection

Question32: What is the defau size of a GridFS chunk?

Question33: Which of the following are valid json documents? Select all that apply.

Question34: Which type of indexes does MongoDB support?

Question35: What is the replication factor for a replicated cluster with 1 primary, 3 secondaries with one of them hidden.
The set also has an arbiter?

Question36: Addding the index {a:l} can potentially decrease the speed of which of the following operations? Check all that apply.

Question37: Consider the following document:
> db.c.find()
{ "_id" : 12, b : [ 3, 5, 7, 2, 1, -4, 3, 12 ] }
Which of the following queries on the "c" collection will return only the first five elements of the array in the
"b"
field? E.g.,
Document you want returned by your query:
{ "_id" : 12, "b" : [ 3, 5, 7, 2, 1 ] >

Question38: Which command is used to determine storage capacity of specific database?

Question39: Update If Correct is an approach for which of the following concepts in MongoDB:

Question40: MongoDB is

Question41: MongoDB is a schema-less design.

Question42: Consider a collection posts which has fields: Jd, post_text, post_author, post_timestamp, post_tags etc. Which of the following query retrieves ONLY the key named post_text from the first document retrieved?

Question43: Which of the following is true about sharding?