Correct Answer:
Strings
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Output
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Use the createIndex() command with the option background = true.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Null
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Document
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Db.customers.find({}, {_id:0, firstName: 1, lastName: 1})
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
JSON (JavaScript Object Notation)
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Db.createUser({})
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
As a properly formatted JSON array
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Establish security credentials.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
_id
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Do a $text query.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Create an index on the field you are sorting.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
The import command prompts you to correct the bad record.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Db.customers.find({}).sort({name: -1})
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Load('list.js)
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Mongo
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
The oplog will be saved on one of the secondary servers.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Use db.collection.format(numeric)
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
-nodb
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
DropDatabase()
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Allows you to select which fields should be in the return data
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
MongoDB does not allow ad hoc queries; all queries require an index.
MongoDB allows ad hoc queries.
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Restart the mongod process.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Mongo-daemon
Mongod
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Db.person.find({homePhone: {$exists: true}});
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
QueryPlanner mode
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Db.shutdownServer()
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Use the updateMany() command instead
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Db.people.getIndexes();
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Primary
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Db.customers.drop();
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Db.customers.remove({_id: 1});
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Dbadmin
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Db.persons.find().sort({lastName: 1}}
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Data, namespace, and journal
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
_id
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Db.customers.save({name:
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Delete the original index and create a new index.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Sort, skip, limit
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
The _id field
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Not access the data
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Mongoimport
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Create a text index on each field.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
JavaScript
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
GeoJSON
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
They speed up read access while slowing down writes.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
MyCursor.explain()
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Every 2 seconds
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
They run faster than indexed queries.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Combine fields in different collations.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
You can't. Once set, the _id field cannot be changed.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Db.customers.createIndex({lastName:1, firstName: 1})
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Db.customers.createIndex({firstName:
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Db.customers.find({}).skip(5).limit(10)
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Limit
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
It casts the tie-breaking vote in an election.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
--setParameter authenticationMechanisms=GSSAPI
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Immediately
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Db.dropUser(
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Set allowDiskUse to true.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Db.customers.find({lastName: 'smith'}).explain()
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Mongo
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
--jsonArray
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Db.users.find({_id: 1})
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
_id.getTimestamp()
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Documents
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Db.citizens.find({age: {$gte: 21}})
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Mongodump
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
When there are so many embedded document updates that it becomes a bottleneck for performance
Note: This Question is unanswered, help us to find answer for this one
When is sharding needed? (choose all that apply)
Correct Answer:
Local disk is not big enough
Vertical scaling is too expensive
Memory can't be large enough when the active dataset is big
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
How many chunks can there be if the shard key cardinality is 4?
Correct Answer:
4
Note: This Question is unanswered, help us to find answer for this one
If the value of totalKeysExamined is 30000 and the value of totalDocsExamined is 0, which option is correct?
Correct Answer:
The query used an index to fetch the results
Note: This Question is unanswered, help us to find answer for this one
Which of the following cursor methods is used to select a particular index?
Correct Answer:
hint
Note: This Question is unanswered, help us to find answer for this one
If you created a compound index on (X, Y, Z), which access pattern will not be able to utilize the index?
Correct Answer:
Y, Z
Note: This Question is unanswered, help us to find answer for this one
Which of the following could be a use case where MongoDB is a good fit?
Correct Answer:
When you need to store data with nested arrays
Note: This Question is unanswered, help us to find answer for this one
All the replica set members contain a copy of the oplog in the _____ collection.
Correct Answer:
local.oplog.rs
Note: This Question is unanswered, help us to find answer for this one
Which statement best describes $allElementsTrue?
Correct Answer:
Evaluates an array as a set and returns true if no element in the array is false. If a the array contains a nested array it does not descend into the nested array but evaluates the array at top-level
Note: This Question is unanswered, help us to find answer for this one
The following statement is most suitable for the following aggregation stage: "Used to select fields from the collection while aggregation".
Correct Answer:
$project
Note: This Question is unanswered, help us to find answer for this one
Which of the following is not an aggregation operation? (choose all that apply)
Correct Answer:
Update
Insert
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
How can you create index on a particular key in MongoDB?
Correct Answer:
db.COLLECTION_NAME.createIndex({ KEY: 1 })
Note: This Question is unanswered, help us to find answer for this one
Which statement is valid?
Correct Answer:
MongoDB shards data at the collection level.
Note: This Question is unanswered, help us to find answer for this one
Which of the following commands will return all the posts with a number of likes greater than 100 and less than 200, including the limit values ?
Correct Answer:
db.posts.find({ likes : { $gte : 100 , $lte : 200 } } );
Note: This Question is unanswered, help us to find answer for this one
Which of following helps analyze a query?
Correct Answer:
explain
Note: This Question is unanswered, help us to find answer for this one
Which of the following calls will set a 1 second limit for processing operations?
Correct Answer:
.maxTimeMS(1000)
Note: This Question is unanswered, help us to find answer for this one
MongoDB is a process collection of documents using (...) operations
Correct Answer:
Map-reduce
Note: This Question is unanswered, help us to find answer for this one
The code below is used to try to delete a collection in the mongo shell: db.my-collection.drop() Choose the best statement that best describes why the code fails to delete the collection.
Correct Answer:
The shell's interpreter tries to apply this as subtraction
Note: This Question is unanswered, help us to find answer for this one
Which statement best describes the query below? db.col1.findAndModify({ query: {"name": "val1"}, update: { $inc: { "subObj.field1": 1 } });
Correct Answer:
Returns a single document where name is val1 and field1 is unmodified in the returned document
Note: This Question is unanswered, help us to find answer for this one
Regarding Pipeline Operators in MongoDB, which of the following is an incorrect statement? (choose all that apply)
Correct Answer:
$avg is an accumulator operator available only in the $group stage
$sum accumulator can be used to compute the total amount and count for each group of documents
All of the mentioned
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Which option is the most suitable advantage of using embedded documents?
Correct Answer:
It allows reading connected data in a single request to the database.
Note: This Question is unanswered, help us to find answer for this one
Which of the following methods allows to insert documents into a collection?
Correct Answer:
insert
Note: This Question is unanswered, help us to find answer for this one
Your rs.add("....") is missing the quotation marks
Correct Answer:
Hashed
Key
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Which of the following is true about replica set? (choose all that apply)
Correct Answer:
It's a group of servers with one primary.
It's a group of servers with many secondaries.
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Which of the following is the correct call to setup replica set?
Correct Answer:
None of these
Note: This Question is unanswered, help us to find answer for this one
What can be done to optimize aggregation pipeline?
Correct Answer:
Place the $match as early in the aggregation pipeline as possible
Note: This Question is unanswered, help us to find answer for this one
Which of the read preference modes in a replica set configuration specify the operations to be read from the node whose network latency falls within the acceptable latency window?
Correct Answer:
nearest
Note: This Question is unanswered, help us to find answer for this one
You are setting up replication for a mongodb cluster and you get the following error "no replset config has been received". Choose the most probable reason:
Correct Answer:
You have not run rs.initiate() in the master node and rs.slaveOk() on the secondaries
Note: This Question is unanswered, help us to find answer for this one
You have a 10G primary partition with your data in in ' /var/lib/mongodb/'. Choose the best option to transfer data to a larger partition:
Correct Answer:
Just move your folder, add symlink, then tune permissions
Note: This Question is unanswered, help us to find answer for this one
Which of the following calls will remove all users who are older than 21 from Users collection?
Correct Answer:
db.users.remove({age: {$gt: 21}});
db.users.deleteMany({age: {$gt: 21}});
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Which of the following parameters affect ObjectId?
Correct Answer:
Timestamp
Note: This Question is unanswered, help us to find answer for this one
Which of the following is the correct calling of creating an index?
Correct Answer:
db.somecollection.createIndex({key:1});
db.somecollection.ensureIndex({key:1}, { expireAfterSeconds: 3600 });
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Which of the following options exists in ensureIndex method?
Correct Answer:
background
unique
name
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Which of the following are stages of aggregation?
Correct Answer:
$sort
$skip
$limit
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Which of the following is true? Check all that apply.
Correct Answer:
A replica set is a group of mongodb instances that host the same data set.
Note: This Question is unanswered, help us to find answer for this one
Choose the best description of the query below:- db.users.find ({ "name" : /m/i } ).pretty()
Correct Answer:
case insensitive query for those users whose name has 'm'
Note: This Question is unanswered, help us to find answer for this one
Under what conditions is it required to use the db.getCollection() method in the mongo shell to delete a collection?
Correct Answer:
If your collection name includes the underscore character
Note: This Question is unanswered, help us to find answer for this one
For a large data set in terms of size on the volume your MongoDB is exhibiting poor write performance. Choose the most probable reason
Correct Answer:
The 'index space' is to large
Note: This Question is unanswered, help us to find answer for this one
In a shared replica set environment, w defined the level and kind of write concern. Which of the following values of w specifies ti return success only after a majority of voting members have acknowledge?
Correct Answer:
majority
Note: This Question is unanswered, help us to find answer for this one
Choose the statement that best describes the query below: db.myCol.find().sort({$natural:-1}).limit(50);
Correct Answer:
Returns the last 50 entries in descending order
Note: This Question is unanswered, help us to find answer for this one
Why use replication?
Correct Answer:
All of the above
Note: This Question is unanswered, help us to find answer for this one
For the mongo shell function below function last(N) { return db.collection.find().skip(db.collection.count() - N); }
Correct Answer:
db.collection.find().skip(db.collection.count() - N)
Note: This Question is unanswered, help us to find answer for this one
Which of the following is the correct order in pipelining in mongo aggregation?
Correct Answer:
$match, $group, $project, $sort, $skip, $limit, $unwind
Note: This Question is unanswered, help us to find answer for this one
How many members a replica set can have?
Correct Answer:
Up to 50
Note: This Question is unanswered, help us to find answer for this one
Which of the following methods will shut down replica set?
Correct Answer:
newReplica.stopSet();
Note: This Question is unanswered, help us to find answer for this one
Choose the statement that best describes how indexing improve query response time
Correct Answer:
The index size is less than the collection size so the look up is quicker its that simple
Note: This Question is unanswered, help us to find answer for this one
For the query below db.collection.find( { x: 5 } ).sort( { z: 1} ) Choose the best index to support the query
Correct Answer:
{ x: 1, z: 1 }
Note: This Question is unanswered, help us to find answer for this one
Choose the type of query where indexes can result in slower query response time.
Correct Answer:
where a query is going to return almost an entire collection
Note: This Question is unanswered, help us to find answer for this one
Given the below statement, please choose the most probable reason:- "You have a web application with mongodb as a backend. A query returns a resultset, however when called a second time the result set is empty."
Correct Answer:
Someone just dropped the collection
Note: This Question is unanswered, help us to find answer for this one
Which of the following are correct index types?
Correct Answer:
All of the above.
Note: This Question is unanswered, help us to find answer for this one
What is the minimum nodes required for replica?
Correct Answer:
2
Note: This Question is unanswered, help us to find answer for this one
Describe the best use case for choosing MongoDB map-reduce.
Correct Answer:
For aggregation queries on small data sets
Note: This Question is unanswered, help us to find answer for this one
Suppose we have a collection of users with different ages. Which of the following calls will find the oldest person with the name John?
Correct Answer:
db.users.aggregate({$match: {name: "John"}}, {$sort: {age: -1}}, {$limit: 1});
Note: This Question is unanswered, help us to find answer for this one
Choose the statement that best describes the query below: db.myCol.find().sort({_id:1});
Correct Answer:
Will sort in ascending numerical order
Note: This Question is unanswered, help us to find answer for this one
Which of the following is a valid MongoDB document?
Correct Answer:
{}
Note: This Question is unanswered, help us to find answer for this one
Point out the correct statement.
Correct Answer:
All of the mentioned
Note: This Question is unanswered, help us to find answer for this one
When should one should avoid embedding one document within another in MongoDB?
Correct Answer:
When writing to the complex documents is very heavy.
Note: This Question is unanswered, help us to find answer for this one
If the address data is frequently retrieved with the name information,how will you modify the following schema representing one to one relationship with referencing ? { _id: "joe", name: "Joe Bookreader" } { patron_id: "joe", street: "123 Fake Street", city: "Faketon", state: "MA", zip: "12345" }
Correct Answer:
{ _id: "joe", name: "Joe Bookreader", address: { street: "123 Fake Street", city: "Faketon", state: "MA", zip: "12345" } }
Note: This Question is unanswered, help us to find answer for this one
Which of following points describes when using embedded data models?
Correct Answer:
To have better performance.
Note: This Question is unanswered, help us to find answer for this one
Which of the following fields DBRefs has?
Correct Answer:
All of the above
Note: This Question is unanswered, help us to find answer for this one
For a mongo mapreduce flow, the emit function has the form emit(this.cId, {q1:this.Q1, q2s:this.Q2}); Choose the correct return value for the reduce function
Correct Answer:
return {a:this.Q1, b:this.Q2};
Note: This Question is unanswered, help us to find answer for this one
For a collection that represents type A { “field1” : “val1”, “field2” : “val2” } Choose the best way to optimize the collection for updates if field2 is an Enumeration.
Correct Answer:
{ “field1” : “val1”, field2 : [“val2”] }
Note: This Question is unanswered, help us to find answer for this one
Which of the following are captured by the Database Profiler in MongoDB ?
Correct Answer:
All of the above
Note: This Question is unanswered, help us to find answer for this one
Which of the following is a correct command to insert a document in a database called album and collection called songs?
Correct Answer:
db.songs.insert( { title: "Roar", artist: "Katy Perry" } )
Note: This Question is unanswered, help us to find answer for this one
The query below returns a collection of users with a projection db.users.find({}, {name: 1, _id : 1}) Choose the best statement that describes how to extract a collection of users with the projection that shows the creation date
Correct Answer:
Map the projection with ObjectId.getTimestamp()
Note: This Question is unanswered, help us to find answer for this one
Which of the following operation adds a new document to the users collection ?
Correct Answer:
insert
Note: This Question is unanswered, help us to find answer for this one
If you are using { upsert: true } option in your update command, which of the following parameters will be used to determine if any new documents were inserted:
Correct Answer:
nUpserted
Note: This Question is unanswered, help us to find answer for this one
Consider the following document from the products collection: { _id: 1, product_code: "1234", variations: [ { size: "L", price: 1000 }, { size: "M", price: 800 } ] } What does the following query using $elemMatch return? db.products.find( { product_code: "1234" }, { variations: { $elemMatch: { size: "L" } } } )
Correct Answer:
Returns the document but with only one element in the variations array (corresponding to size L)
Note: This Question is unanswered, help us to find answer for this one
Which method in MongoDB replaces the existing document with the new document passed as parameter?
Correct Answer:
save()
Note: This Question is unanswered, help us to find answer for this one
Which command can be used to check the size of a collection named user?
Correct Answer:
db.user.stats()
Note: This Question is unanswered, help us to find answer for this one
Which of the following command can be used to check the size of a collection named user?
Correct Answer:
db.user.stats()
Note: This Question is unanswered, help us to find answer for this one
Which of the following SQL terminilogy is same as $match in MongoDB?
Correct Answer:
Both WHERE and HAVING
Note: This Question is unanswered, help us to find answer for this one
Choose the best description of why MongoDB performs well on a non heterogeneous cluster:
Correct Answer:
Every shard in MongoDB is its own mongod
Note: This Question is unanswered, help us to find answer for this one
___ filters the document stream to allow only matching documents to pass unmodified into the next pipeline stage.
Correct Answer:
$match
Note: This Question is unanswered, help us to find answer for this one
Which of the following operators is related to geography of data ?
Correct Answer:
$geoNear
Note: This Question is unanswered, help us to find answer for this one
Sometimes the failover process may require a ____ during operation.
Correct Answer:
rollback
Note: This Question is unanswered, help us to find answer for this one
Consider the following posts collection in MongoDB, { "_id" : 1, "post_title" : "this is post title", "tags": [ "social", "friends", "books"], // rest of the document } What will be the output of following query: db.posts.aggregate( [ { $unwind : "$tags" } ] )
Correct Answer:
Return three separate documents for three separate tags
Note: This Question is unanswered, help us to find answer for this one
Which of the following best describes the concept of Aggregations in MongoDB ?
Correct Answer:
It's the operation that process data records and return computed results, by grouping values from multiple documents together, so that it can perform a variety of operations on the grouped data to return a single result.
Note: This Question is unanswered, help us to find answer for this one
Which aggregation option is used to specify the fields that need to be passed to the next stage of the aggregation pipeline?
Correct Answer:
$project
Note: This Question is unanswered, help us to find answer for this one
Which of the following best describes the concept of Replication in MongoDB ?
Correct Answer:
It's the process of synchronizing data across multiple servers, providing redundancy and increases data availability, with multiple copies of data on different database servers.
Note: This Question is unanswered, help us to find answer for this one
Regarding indexing and performance in MongoDB, choose the correct statement :
Correct Answer:
If you sometimes query on only one key and at other times query on that key combined with a second key, then creating a compound index is more efficient than creating a single-key index
Note: This Question is unanswered, help us to find answer for this one
In MongoDB, a query ____ consists of a combination of query, sort, and projection specifications.
Correct Answer:
shape
Note: This Question is unanswered, help us to find answer for this one
What is a covered query?
Correct Answer:
Query in which fields used in the query are part of an index used in the query and the fields returned in the results are in the same index.
Note: This Question is unanswered, help us to find answer for this one
Regarding aggregation pipeline optimization concepts in MongoDB, if you have a $sort followed by a $match:
Correct Answer:
$match moves before $sort to minimize the number of objects to sort
Note: This Question is unanswered, help us to find answer for this one
Regarding storage in MongoDB, which of the following is incorrect?
Correct Answer:
When running a 32-bit build of MongoDB, the total storage size for the server, including data and indexes, is 2 gigabytes. For this reason, do not deploy MongoDB to production on 32-bit machines.
When journaling is enabled, MongoDB stores and applies write operations in memory and in the on-disk journal after the changes are present in the data files on disk.
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
What is the maximum size of an Index key?
Correct Answer:
1024 bytes
Note: This Question is unanswered, help us to find answer for this one
What is the maximum number of Indexes per collection allowed?
Correct Answer:
64 indexes
Note: This Question is unanswered, help us to find answer for this one
Choose the best statement that describes: "why aggregation queries outperform mapreduce for small datasets".
Correct Answer:
There is a JavaScript lock so a mongod server can only execute one JavaScript function at a time
Note: This Question is unanswered, help us to find answer for this one
Which of the following expressions can not be used with aggregation?
Correct Answer:
$pop
Note: This Question is unanswered, help us to find answer for this one
What will be the output of the following two commands in MongoDB: db.mycol.insert({"_id":1}) db.mycol.insert({"_id":1})
Correct Answer:
This will throw duplicate key error
Note: This Question is unanswered, help us to find answer for this one
Choose the best description of the output for the query below var weekAgo = Date.now() - (1000*60*60*24*7); db.visits_calc.group( { key:{date:true}, cond:{date:{$gt:weekAgo}}, reduce:function(obj, out) {out.day += obj.total}, initial:{day:0} });
Correct Answer:
Returns results for the last week grouped by day
Note: This Question is unanswered, help us to find answer for this one
Regarding data modeling in MongoDB, which of the following is correct ?
Correct Answer:
All of the above
Note: This Question is unanswered, help us to find answer for this one
Which of the following commands will find all the posts that have been tagged as tutorial?
Correct Answer:
db.posts.find({ tags: "tutorial" })
Note: This Question is unanswered, help us to find answer for this one
What kind of NoSQL database MongoDB is?
Correct Answer:
Document Oriented
Note: This Question is unanswered, help us to find answer for this one
Which of the following are atomic operations in MongoDB?
Correct Answer:
.remove
.findAndModify
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Point out the wrong statement :
Correct Answer:
Collections do enforce document structure
Note: This Question is unanswered, help us to find answer for this one
Which of the following is correct about Capped Collections?
Correct Answer:
To make room for new documents, capped collections automatically remove the oldest documents in the collection without requiring scripts or explicit remove operations.
High-throughput operations that insert and retrieve documents based on insertion order.
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
What is the default size of GridFS chunk?
Correct Answer:
255 kB
Note: This Question is unanswered, help us to find answer for this one
Which one of the following is a primary key in MongoDB?
Correct Answer:
_id
Note: This Question is unanswered, help us to find answer for this one
Which of the following methods can be used in MongoDB for relating documents?
Correct Answer:
Both of the above
Note: This Question is unanswered, help us to find answer for this one
Which of the following is correct for _id in MongoDB?
Correct Answer:
_id: ObjectId(4 bytes timestamp, 3 bytes machine id, 2 bytes process id, 3 bytes incrementer)
Note: This Question is unanswered, help us to find answer for this one
Which of the following collections are used by MongoDB to store GridFS data?
Correct Answer:
fs.files and fs.chunks
Note: This Question is unanswered, help us to find answer for this one
What is Profiler?
Correct Answer:
Profiler is used to show the performance characteristics of every operation against the database.
Note: This Question is unanswered, help us to find answer for this one
Which of the following is correct syntax for creating an index?
Correct Answer:
db.mycol.createIndex({"title":1})
Note: This Question is unanswered, help us to find answer for this one
Which of the following is the most suitable advantage of using embedded documents?
Correct Answer:
Improves read performance and allow to reading of data in a single request to the database.
Note: This Question is unanswered, help us to find answer for this one
Which of the following command inside aggregate command is used in MongoDB aggregation to filter the documents to pass only the documents that match the specified condition to the next pipeline stage?
Correct Answer:
$match
Note: This Question is unanswered, help us to find answer for this one
In MongoDB, write operations are atomic at the (...........) level.
Correct Answer:
document
Note: This Question is unanswered, help us to find answer for this one
Query shape consists of a combination of query, sort, and _____ specifications.
Correct Answer:
projection
Note: This Question is unanswered, help us to find answer for this one
Which of the following operations will write the resulting documents of the aggregation pipeline to a collection in MongoDB?
Correct Answer:
$out
Note: This Question is unanswered, help us to find answer for this one
What is the difference between Sharding and Replication ?
Correct Answer:
Replication creates additional copies of the data and allows for automatic failover while Sharding allows for horizontal scaling of data writes by partitioning data across multiple servers.
Note: This Question is unanswered, help us to find answer for this one
Regarding MongoDB sharding, choose the correct statement:
Correct Answer:
MongoDB distributes data, or shards, at the collection level
Note: This Question is unanswered, help us to find answer for this one
Why is sharding necessary?
Correct Answer:
All of the above
Note: This Question is unanswered, help us to find answer for this one
Why Sharding?
Correct Answer:
Local disk is not big enough
Vertical scaling is too rexpensive
Memory cant be large enough when active dataset is big
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Which of the following describes best the concept of Sharding in MongoDB ?
Correct Answer:
t's a method for storing data across multiple machines. MongoDB uses it to support deployments with very large data sets and high throughput operations.
Note: This Question is unanswered, help us to find answer for this one
Regarding MongoDB sharding, choose the incorrect statement:
Correct Answer:
For hash-based sharding, MongoDB divides the data set into ranges determined by the shard key values to provide hash based partitioning.
Note: This Question is unanswered, help us to find answer for this one
Which of the following components exists in sharded cluster?
Correct Answer:
All of the above
Note: This Question is unanswered, help us to find answer for this one
A query fails to return a complete result set on a sharded cluster. Choose the most probable reason
Correct Answer:
All the members of the sharded cluster can not reach all the other members
Note: This Question is unanswered, help us to find answer for this one
_____ interface with client applications and direct operations to the appropriate shard or shards.
Correct Answer:
Query Routers
Note: This Question is unanswered, help us to find answer for this one
Which of the following is true about sharding?
Correct Answer:
Sharding uses horizontal scaling.
Note: This Question is unanswered, help us to find answer for this one
Choose the best commands to clone a collection to a sharded cluster from a developer machine.
Correct Answer:
Both mongoimport and mongoexport have optional --host and --port parameters to import from / export to a remote server
Note: This Question is unanswered, help us to find answer for this one
What do you mean by sharding?
Correct Answer:
Storing data records across multiple machines to meet the demands of data growth.
Note: This Question is unanswered, help us to find answer for this one
Choose the best description for the query below db.foo.find({ $text:{ $search:"text" } });
Correct Answer:
match query for strings containing 'text'
Note: This Question is unanswered, help us to find answer for this one
Describe the output of the following mongo shell JavaScript: Object.keys(db.collection.findOne())
Correct Answer:
Lists all the collection's keys
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
--dbpath
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
No
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
db.foo.find({b:1})
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
12,000
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Improve the performance of 2D geospatial queries
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
1
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
101
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Data-center awareness
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
>=2.2
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Specifying in key like { lat : -50, lon : 13 }
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
{ $inc : { foo : -1 } }
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
natural order
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
regular, hidden, and arbiters
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
WGS84
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
6
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Hash table
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Strongly consistent by default, can be made eventually consistent
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
db.profile.find({interests: {$all : ["Football", "Reading"] }})
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
2
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
db.test.aggregate([{ $project: { name: { $concat: ['prefix', '$name'] } } }]);
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
(a), (a,b), or (a,b,c)
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Use Aggregation Framework
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
True
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Selects a replica set member to read from
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Cannot become a primary member
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Observe the success or failure of database writes
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
The oldest entry is overwritten with the new document
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Non-vital, chronological records, like logs
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
BSON
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
padding
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
$ or .
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
mongos
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Produce consistent results over multiple runs, given the same input
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
having
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Slows down writes that involve the index
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
It allows faster, more reliable recovery after a crash
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Replica Sets
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Time To Live
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
True, MongoDB indexes each element of the array.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
save() updates the document if if already exists (judges by if they already contains `_id`); inserts if it's new.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Off by default.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
$addToSet
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
GridFS
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Replica Sets
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Group by
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
False
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
V8
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
db.myCollection.reIndex()
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Sharding
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Collections which are write-intensive
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
findAndModify()
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
CRUD
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Replica sets
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Create, Read, Update, Delete
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
MongoDB does not support transactions but operations are atomic.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
ensureIndex()
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Can be performed concurrently on the same collection, without affecting the intermediate states
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
db.user.ensureIndex({user_name:1});
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
All of above
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
True
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Collections
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Always
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Document-oriented DBMS
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
(All of these)
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
JavaScript
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
asynchronous
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Javascript
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
{Name: "Schoolify", url: 'www.schoolifybd.com'}
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
All of these
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
If you do not specify and _id when doing an insert, the driver will create one for you
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Atomic (per document) operations
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
find()
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
BSON objects
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Tab-separated text fields
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Journal
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
All of above.
Note: This Question is unanswered, help us to find answer for this one
MongoDB MCQs | Topic-wise