This set of MongoDB Multiple Choice Questions & Answers (MCQs) focuses on “Map-Reduce”.
1. Which of the following database command is used for mapreduce function?
a) mapReduce
b) mapperRed
c) redmap
d) none of the mentioned
View Answer
Explanation: For map-reduce operations, MongoDB provides the mapReduce database command.
2. MongoDB applies the _____ phase to each input document in mapreduce.
a) map
b) reduce
c) mapper
d) all of the mentioned
View Answer
Explanation: The map function emits key-value pairs.
3. MongoDB applies the _________ phase, which collects and condenses the aggregated data.
a) map
b) reduce
c) mapper
d) all of the mentioned
View Answer
Explanation: MongoDB then stores the results in a collection.
4. The output of the reduce function may pass through a ______ function to further condense or process the results of the aggregation.
a) finalize
b) filter
c) procedure
d) none of the mentioned
View Answer
Explanation: The input and the output collections may be sharded.
5. _________ can return the results of a map-reduce operation as a document, or may write the results to collections.
a) mapReduce
b) mapperRed
c) RedMap
d) none of the mentioned
View Answer
Explanation: Map-reduce operations take the documents of a single collection as the input and can perform any arbitrary sorting and limiting before beginning the map stage.
6. Map-reduce uses custom __________ functions to perform the map and reduce operations.
a) Java
b) Javascript
c) JSON
d) None of the mentioned
View Answer
Explanation: JavaScript provide great flexibility compared to the aggregation pipeline.
7. For most aggregation operations, the ______ Pipeline provides better performance and more coherent interface.
a) Aggregate
b) Replication
c) Sharding
d) None of the mentioned
View Answer
Explanation: Map-reduce operations provide some flexibility that is not presently available in the aggregation pipeline.
8. What would be the maximum document size for results of mapreduce operation?
a) 15 MB
b) 16 MB
c) 17 MB
d) All of the mentioned
View Answer
Explanation: When returning the results of a map reduce operation inline, the result documents must be within the BSON Document Size limit, which is currently 16 megabytes.
Sanfoundry Global Education & Learning Series – MongoDB.
Here’s the list of Best Books in MongoDB.
- Get Free Certificate of Merit in MongoDB
- Participate in MongoDB Certification Contest
- Become a Top Ranker in MongoDB
- Take MongoDB Tests
- Chapterwise Practice Tests: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
- Chapterwise Mock Tests: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
- Buy MongoDB Books
- Practice Programming MCQs
- Apply for MongoDB Internship
- Apply for Programming Internship
- Buy Information Technology Books