Tuesday, December 15, 2015

MongoDB test answers of 2016.

Find Complete and recently updated Correct Question and answers of MongoDB. All Answers updated regularly with new questions. Upwork MongoDB test answers of 2016.



Question:* In what language(s) is MongoDB supported?

Answer: • All of above.

Question:* Authentication in MongoDB is:

Answer: • Off by default.

Question:* Which of the following statements are true about MongoDB

Answer: • MongoDB does not support transactions but operations are atomic.

Question:* Which of the following is syntactically correct for searching the "posts" collection for a post with the title of "Big News Story"?

Answer: • db.posts.find({title: 'Big News Story'});

Question:* You can write custom MapReduce functions in MongoDB using:

Answer: • Javascript

Question:* The MongoDB database is capable of:

Answer: • Atomic (per document) operations

Question:* What does MongoDB's Sharding provide?

Answer: • All of these

Question:* This replication process is

Answer: • asynchronous

Question:* MongoDB stores documents in structures called

Answer: • BSON objects

Question:* Which of the following would you use to query an inventory collection to get all items of type "food" with price less than $34?

Answer: • db.inventory.find({type: "food", price: {$lt: 34}})

Question:* How can you optimize document storage?

Answer: • (All of these)

Question:* The interactive "mongo" shell interface is based on:

Answer: • JavaScript

Question:* The maximum BSON document size is:

Answer: • 16 megabytes

Question:* Which of the following terms describe MongoDB?

Answer: • Document-oriented DBMS

Question:* Which of the following expressions are valid JSON documents?

Answer: • {Name: "Schoolify", url: 'www.schoolifybd.com'}

Question:* Instead of tables, MongoDB stores data in structures called:

Answer: • Collections

Question:* Which of the following statement are true

Answer: • If you do not specify and _id when doing an insert, the driver will create one for you

Question:* MongoDB's query language uses operators that start with which character?

Answer: • $

Question:* To perform a search on a collection, and obtain a cursor object for the results, use:

Answer: • find()

Question:* MongoDB supports UTF-8 for strings in stored objects and queries:

Answer: • Always

Question:* Which method should be used to create an index on a collection, if it does not already exist?

Answer: • ensureIndex()

Question:* Which statement of the followings could NOT drop an index?

Answer: • db.myCollection.reIndex()

Question:* To create an index for user_name field on user collection, which of the following is the correct syntax?

Answer: • db.user.ensureIndex({user_name:1});

Question:* The map-reduce operation uses a temporary collection for data processing; The benefit of this behavior is that the operations:

Answer: • Can be performed concurrently on the same collection, without affecting the intermediate states

Question:* The currently preferred replication method is called:

Answer: • Replica sets

Question:* TSV files should be expected to contain:

Answer: • Tab-separated text fields

Question:* MongoDB uses GridFS to:

Answer: • Store large files, distributed as smaller pieces

Question:* The aggregation framework is most similar to which facility from the world of relational databases

Answer: • Group by

Question:* To atomically modify and return a single document from a collection, use:

Answer: • findAndModify()

Question:* Which of the following are considered Core MongoDB operations?

Answer: • Create, Read, Update, Delete

Question:* Which feature of mongoDB is used to balance load among multiple machines?

Answer: • Sharding

Question:* Indexes in mongodb are NOT good for:

Answer: • Collections which are write-intensive

Question:* In MongoDB V2.4, what type of JavaScript engine is used to execute all JavaScript on Mongo shell ?

Answer: • V8

Question:* The core database operations in MongoDB are abbreviated as:

Answer: • CRUD

Question:* When Storing large files in MongoDB one is encouraged to use...

Answer: • GridFS

Question:* The binary log of transactions used to recover the database after a crash is called the:

Answer: • Journal

Question:* Which of the following atomic operations would you use to add a value to an array only if it does not already exist in the array?

Answer: • $addToSet

Question:* Which of the following is not a stage in the aggregation pipeline

Answer: • having

Question:* MongoDB uses the acronym TTL to mean:

Answer: • Time To Live

Question:* Which feature of mongoDB is used for data redundancy?

Answer: • Replica Sets

Question:* Indexing

Answer: • Slows down writes that involve the index

Question:* MongoDB's Replication can be in Master-Slave form or _______ form.

Answer: • Replica Sets

Question:* While replication provides data redundancy, journaling is also recommended because:

Answer: • It allows faster, more reliable recovery after a crash

Question:* True or False? MongoDB can have foreign keys.

Answer: • False

Question:* MongoDB can have indexes on Array Elements?

Answer: • True, MongoDB indexes each element of the array.

Question:* What's the difference between `save()` and `insert()` in mongo shell?

Answer: • save() updates the document if if already exists (judges by if they already contains `_id`); inserts if it's new.

Question:* Which platform does MongoDB support?

Answer: • All of above

Question:* MongoDB document names cannot start with the characters:

Answer: • $ or .

Question:* Which of the following binaries handles routing of sharded queries to the proper shard?

Answer: • mongos

Question:* An operation is said to be "idempotent" if it is proven to:

Answer: • Produce consistent results over multiple runs, given the same input

Question:* What do drivers use with protocol on the wire?

Answer: • BSON

Question:* Due to their default behavior, Capped Collections are ideal for storing:

Answer: • Non-vital, chronological records, like logs

Question:* A Priority 0 or "passive" replica member:

Answer: • Cannot become a primary member

Question:* When a Capped Collection becomes full, and a new document is added:

Answer: • The oldest entry is overwritten with the new document

Question:* What is the extra space allocated to document on the disk to prevent moving a document when it grows as the result of update() operations.

Answer: • padding

Question:* "write concern" allows an application to:

Answer: • Observe the success or failure of database writes

Question:* "read preference" affects how an application:

Answer: • Selects a replica set member to read from

Question:* All writes in MongoDB Must go the primary

Answer: • True

Question:* If you have a compound index on multiple fields (a,b,c), you can use it to query on:

Answer: • (a), (a,b), or (a,b,c)

Question:* How many collections are created when use use gridfs to store large files

Answer: • 2

Question:* The equivalent for like %keyword% on mongodb find is:

Answer: • db.collection.find({field:{$regex:{/keyword/},$options:"i"})

Question:* Which of the following is the correct operation to query a document for both 'Football' and "Reading" within the interests data collected from a profile?

Answer: • db.profile.find({interests: {$all : ["Football", "Reading"] }})

Question:* You want to minus one to field foo, what should you use?

Answer: • { $inc : { foo : -1 } }

Question:* How many data types are available in MongoDB?

Answer: • 6

Question:* Which of the following statements are true about the MongoDB Write Consistency model

Answer: • Strongly consistent by default, can be made eventually consistent

Question:* When a replica set election takes place which types of nodes can participate

Answer: • regular, hidden, and arbiters

Question:* What term is use to describe the order that a database stores documents on disk?

Answer: • natural order

Question:* In MongoDB's Geospatial Indexing, if you want to create & use index on EARTH, what is NOT TRUE?

Answer: • Specifying in key like { lat : -50, lon : 13 }

Question:* Which datum does MongoDB use for calculating geospatial coordinates?

Answer: • WGS84

Question:* What is the easiest way to do tasks like totaling or averaging field values in MongoDB newer versions?

Answer: • Use Aggregation Framework

Question:* Which of the following is not a BSON serialization type?

Answer: • Hash table

Question:* A property used to address servers based on their real-world locations is called:

Answer: • Data-center awareness

Question:* You cannot use characters among /\. "*<>:|? in database names, in release version

Answer: • >=2.2

Question:* MongoDB queries return a limited size (or "threshold") of results by default, usually:

Answer: • 101

Question:* What is the minimum number of mongod instances that may make up a replica set?

Answer: • 1

Question:* Suppose you have a collection foo with an index created using the statement db.foo.ensureIndex({a:1, b:-1, c:1}). Which of the following queries could use the index

Answer: • db.foo.find({b:1})

Question:* Haystack Indexes are typically used to:

Answer: • Improve the performance of 2D geospatial queries

Question:* By default, MongoDB allows up to _____ collections.

Answer: • 12,000



No comments:

HTML5 Upwork (oDesk) TEST ANSWERS 2022

HTML5 Upwork (oDesk) TEST ANSWERS 2022 Question: Which of the following is the best method to detect HTML5 Canvas support in web br...

Disqus for upwork test answers