MongoDB MCQ Quiz Hub

MongoDB Mcq Question Set 11

Choose a topic to test your knowledge and improve your MongoDB skills

______ can be used to iterate the cursor of document results returned by db.collection.find().





✅ Correct Answer: 1

To handle large datasets, set _________ option to true to enable writing data to temporary files.





✅ Correct Answer: 2

Syntax for specifying an initial batch size for the cursor is ______





✅ Correct Answer: 2

Query shape consists of a combination of query, sort, and _________ specifications.





✅ Correct Answer: 3

Which of the following method is overrided by Index filters?





✅ Correct Answer: 1

Which of the following database command is used for mapreduce function?





✅ Correct Answer: 1

MongoDB applies the _____ phase to each input document in mapreduce.





✅ Correct Answer: 1

MongoDB applies the _________ phase, which collects and condenses the aggregated data.





✅ Correct Answer: 2

The output of the reduce function may pass through a ______ function to further condense or process the results of the aggregation.





✅ Correct Answer: 1

______ can return the results of a map-reduce operation as a document, or may write the results to collections.





✅ Correct Answer: 1

For most aggregation operations, the ______ Pipeline provides better performance and more coherent interface.





✅ Correct Answer: 1

What would be the maximum document size for results of mapreduce operation?





✅ Correct Answer: 2

___ filters the document stream to allow only matching documents to pass unmodified into the next pipeline stage.





✅ Correct Answer: 3

Point out the wrong statement.





✅ Correct Answer: 3

Which of the following can be used to implement field level redaction?





✅ Correct Answer: 4

___ passes the first n documents unmodified to the pipeline where n is the specified limit.





✅ Correct Answer: 2

____ reorders the document stream by a specified sort key.





✅ Correct Answer: 3

Which of the following operator incorporates the functionality of $match, $sort, and $limit for geospatial data?





✅ Correct Answer: 2

____ Writes the resulting documents of the aggregation pipeline to a collection.





✅ Correct Answer: 1

_____ deconstructs an array field from the input documents to output a document for each element.





✅ Correct Answer: 3

Which of the following operator is related to geography of data?





✅ Correct Answer: 3

Which of the following stages cannot appear multiple times in a pipeline?





✅ Correct Answer: 3

Point out the correct statement.





✅ Correct Answer: 2

Aggregation expressions use ______ path to access fields in the input documents.





✅ Correct Answer: 4

Which of the following statement is equivalent to “$$CURRENT.<field>”?





✅ Correct Answer: 4

Point out the wrong statement.





✅ Correct Answer: 2

____ binds variables for use in the specified expression.





✅ Correct Answer: 2

_____ applies an expression to each item in an array and returns an array with the applied results.





✅ Correct Answer: 1

In the vars assignment block, ________ refers to the value of an externally defined variable low.





✅ Correct Answer: 1

To avoid treating numeric or boolean literals as projection flags, use the _______ expression to wrap the numeric or boolean literals.





✅ Correct Answer: 1

MongoDB treats the literals as projection flags, valid only in the _______ stage.





✅ Correct Answer: 1

____ expressions ignores the duplicate entries in each input array and the order of the elements.





✅ Correct Answer: 1

Point out the correct statement.





✅ Correct Answer: 3

_______ returns true if the input sets have the same distinct elements.





✅ Correct Answer: 3

Which of the following accepts any number of argument expression?





✅ Correct Answer: 1

Point out the wrong statement.





✅ Correct Answer: 4

_____ returns a set with elements that appear in any of the input sets.





✅ Correct Answer: 4

Which of the following performs a relative complement of the second set relative to the first?





✅ Correct Answer: 1

$setIsSubset returns _______ if all elements of the first set appear in the second set, including when the first set equals the second set.





✅ Correct Answer: 3

_____ accepts only single argument expression.





✅ Correct Answer: 3

$allElementsTrue returns true if no element of a set evaluates to _______





✅ Correct Answer: 1

Comparison expressions return a boolean except for ________ which returns a number.





✅ Correct Answer: 2

Point out the correct statement.





✅ Correct Answer: 3

____ returns true if the first value is less than the second.





✅ Correct Answer: 2

$ne returns true if the values are not _______





✅ Correct Answer: 1

$multiply __________ numbers to return the result.





✅ Correct Answer: 1

_____ adds numbers to return the sum, or adds numbers and a date to return a new date.





✅ Correct Answer: 4

_____ returns the remainder of the first number divided by the second.





✅ Correct Answer: 2

String expressions, with the exception of ________ only have a well-defined behavior for strings of ASCII characters.





✅ Correct Answer: 3

_____ subtracts two dates to return the difference in milliseconds.





✅ Correct Answer: 1