Our experts have gathered these MongoDB MCQs through research, and we hope that you will be able to see how much knowledge base you have for the subject of MongoDB by answering these multiple-choice questions.
Get started now by scrolling down!
A. Javascript
B. Python
C. All of above.
D. PHP
E. Perl
A. Journal
B. Ledger
C. Primary Shard
D. Master Replica
A. :
B. $
C. #
D. @
A. Binary data logs
B. Geographic data coordinates
C. Document indexing for a named Collection
D. Tab-separated text fields
A. ODB objects
B. JavaScript objects
C. BSON objects
D. JSON objects
A. findAndModify()
B. query()
C. find()
D. findOne()
A. Atomic (per document) operations
B. Multi-table joins
C. ACID-compliant transactions
D. Multi-object commits with rollbacks
A. The _id of a document need only be unique on the shard in which the document is housed
B. If you do not specify and _id when doing an insert, the driver will create one for you
C. You must specify and _id when inserting documents
D. By default, there is no index on _id. It is best practice to add one if you expect to query based on _id.
A. Scaling to one thousand nodes
B. Automatic failover
C. All of these
D. Automatic balancing for changes in load and data distribution
E. Easy addition of new machines without down time
A. {Name: Schoolify, url: 'www.schoolifybd.com'}
B. {Name: "Schoolify", url: www.schoolifybd.com}
C. {Name: "Schoolify": url: 'www.schoolifybd.com'}
D. {Name: "Schoolify", url: 'www.schoolifybd.com'}
E. {Name: "Schoolify". url: 'www.schoolifybd.com'}
A. Javascript
B. PHP
C. Python
D. Java
E. Json
A. 8 megabytes
B. 16 megabytes
C. 4 megabytes
D. 12 megabytes
A. asynchronous
B. synchronous
A. db.inventory.find({type: "food", price: {$lte: 34}})
B. db.inventory.find({type: "food", price: {$lt: 34}}).explain()
C. db.inventory.find({type: "food", price: {$lt: 34}})
A. posts.search({'title': 'Big News Story'});
B. db.posts.find(title: 'Big News Story');
C. posts.search('title': 'Big News Story');
D. db.posts.find({title: 'Big News Story'});
A. Python
B. Ruby
C. JavaScript
D. Scala
A. Use shorter field names within documents
B. (All of these)
C. Specify an explicit, smaller _id value
D. Embed small documents within other documents
A. Configurable cache
B. Static schema
C. Document-oriented DBMS
D. Relational database
A. Always
B. Never
C. Sometimes
A. Tuples
B. Pages
C. Maps
D. Collections
A. True
B. False
A. All of above
B. Mac OS X
C. Windows
D. Linux
A. db.user.createIndex({user_name:1});
B. db.user.attachIndex({user_name:1});
C. db.user.saveIndex({user_name:1});
D. db.user.ensureIndex({user_name:1});
A. Are more secure than they would be if performed on a named collection
B. Can be performed concurrently on the same collection, without affecting the intermediate states
C. Do not take up any additional space in the database
D. Are more accurate than they would be if performed on the live data
A. reIndex()
B. createIndex()
C. checkIndex()
D. ensureIndex()
A. MongoDB supports transactions
B. MongoDB does not support transactions and operations are not atomic.
C. MongoDB supports joins
D. MongoDB does not support transactions but operations are atomic.
A. Create, Select, Update, Delete
B. Create, Read, Update, Drop
C. Create, Select, Update, Drop
D. Create, Read, Update, Delete
A. Arbiter members
B. Master/Slave
C. Replica pairs
D. Replica sets
A. CRUD
B. JSON
C. MDB
D. BSON
A. upsert()
B. aggregate()
C. update()
D. findAndModify()
A. Collections which are write-intensive
B. Collections where the number of reads is much greater than the number of writes.
A. GridFS
B. BSON
C. Replica Sets
D. Geospatial Indexing
E. Sharding
A. db.runCommand({dropIndexes:'foo', index : '*'})
B. db.collection.dropIndex({x: 1, y: -1})
C. db.runCommand({dropIndexes:'foo', index : {y:1}})
D. db.myCollection.reIndex()
E. db.collection.dropIndexes();
A. Prevent data loss after a crash or hard shutdown
B. Reduce and summarize large data structures
C. Store large files, distributed as smaller pieces
D. Index and sort extremely large sets of documents
A. JavaScriptCore
B. SpiderMonkey
C. V8
D. Futhark
E. Rhino
A. True
B. False
A. views
B. Group by
C. foreign keys
D. constraints
A. Sharding
B. None of above
C. Replications
D. Replica Sets
A. MongoFS
B. GridFS
C. BSON
D. None of these
A. $push
B. $pop
C. $addToSet
D. $inc
E. $pull
A. Available with sharding since version 1.8.
B. Not needed if we use a non-standard port for mongod.
C. U udp firewall between mongod and client connections.
D. Based on Linux user authentication.
E. Off by default.
A. None of above is correct.
B. save() updates the document if if already exists (judges by if they already contains `_id`); inserts if it's new.
C. No difference between them.
D. save() updates the document if if already exists (judges by comparing them byte by byte); inserts if it's new.
E. save() updates the document if if already exists (judges by their indexed keys); inserts if it's new.
A. True, MongoDB indexes the first non-empty element of the array.
B. True, MongoDB indexes each element of the array.
C. True, MongoDB indexes the first element of the array.
D. False
A. Time To Live
B. Table Time Limit
C. Temporary Table Listing
D. Total Time Limit
A. GridFS
B. BSON
C. Replica Sets
D. Sharding
E. Embedded Documents
A. It allows faster, more reliable recovery after a crash
B. It improves write performance on the journaled database
C. It improves read performance on the journaled database
D. It allows the use of Replica Sets in addition to Replica Pairs
A. Makes writes that involve the index faster
B. Makes all writes faster
C. Slows down reads that involve the index
D. Slows down writes that involve the index
A. having
B. limit
C. group
D. sort
A. Produce varying results when run multiple times, even with the same input
B. Eventually produce consistent results, if run a sufficient number of times with the same inputs
C. Produce consistent results over multiple runs, given the same input
D. Produces results within linear time, compared to the number of inputs
A. mongod
B. mongorouter
C. mongos
D. mongo