Home
MCQS
MongoDB MCQ Quiz Hub
MongoDB Mcq Question Set 11
Choose a topic to test your knowledge and improve your MongoDB skills
1. ______ can be used to iterate the cursor of document results returned by db.collection.find().
it
next
cur
None of the mentioned
2. To handle large datasets, set _________ option to true to enable writing data to temporary files.
enableDiskUse
allowDiskUse
validateDiksUse
None of the mentioned
3. Syntax for specifying an initial batch size for the cursor is ______
cursor: { batchSize: <string> }
cursor: { batchSize: <int> }
cur: { batchSize: <int> }
None of the mentioned
4. Query shape consists of a combination of query, sort, and _________ specifications.
selection
projection
collection
None of the mentioned
5. Which of the following method is overrided by Index filters?
hint
plan
execute
All of the mentioned
6. Which of the following database command is used for mapreduce function?
mapReduce
mapperRed
redmap
None of the mentioned
7. MongoDB applies the _____ phase to each input document in mapreduce.
map
reduce
mapper
All of the Mentioned
8. MongoDB applies the _________ phase, which collects and condenses the aggregated data.
map
reduce
mapper
All of the Mentioned
9. The output of the reduce function may pass through a ______ function to further condense or process the results of the aggregation.
finalize
filter
procedure
None of the mentioned
10. ______ can return the results of a map-reduce operation as a document, or may write the results to collections.
mapReduce
mapperRed
RedMap
None of the mentioned
11. For most aggregation operations, the ______ Pipeline provides better performance and more coherent interface.
Aggregate
Replication
Sharding
None of the mentioned
12. What would be the maximum document size for results of mapreduce operation?
15 MB
16 MB
17 MB
All of the Mentioned
13. ___ filters the document stream to allow only matching documents to pass unmodified into the next pipeline stage.
$regex
$reg
$match
None of the mentioned
14. Point out the wrong statement.
Documents do not pass through the stages in sequence
Pipeline stages appear in an multi dimensional array
$project reshapes each document in the stream, such as by adding new fields or removing existing fields
All of the Mentioned
15. Which of the following can be used to implement field level redaction?
$skip
$limit
$match
$redact
16. ___ passes the first n documents unmodified to the pipeline where n is the specified limit.
$skip
$limit
$match
$redact
17. ____ reorders the document stream by a specified sort key.
$skip
$limit
$sort
none of the mentioned
18. Which of the following operator incorporates the functionality of $match, $sort, and $limit for geospatial data?
$geoSpatial
$geoNear
$geoRear
None of the mentioned
19. ____ Writes the resulting documents of the aggregation pipeline to a collection.
$out
$in
$output
None of the mentioned
20. _____ deconstructs an array field from the input documents to output a document for each element.
$unwindelem
$unwind
$unwin
None of the mentioned
21. Which of the following operator is related to geography of data?
$geoSpatial
$geoNear
$geoRear
none of the mentioned
22. Which of the following stages cannot appear multiple times in a pipeline?
$regex
$reg
$match
$out
23. Point out the correct statement.
To access variables in expressions, use a string that prefixes the variable name with $$$
Expressions can include field paths and system variables, literals, expression objects, and expression operators
To specify a field path, use a string that prefixes with a dollar sign % the field name or the dotted field name
All of the mentioned
24. Aggregation expressions use ______ path to access fields in the input documents.
mpath
dbpath
lpath
Field
25. Which of the following statement is equivalent to “$$CURRENT.<field>”?
“$%&lt;field&gt;”
“%&lt;field&gt;”
“$$&lt;field&gt;”
“$&lt;field&gt;”
26. Point out the wrong statement.
Literals can be of any type
CURRENT cannot be rebound
MongoDB parses string literals that start with a dollar sign $
None of the mentioned
27. ____ binds variables for use in the specified expression.
$skip
$let
$bind
None of the mentioned
28. _____ applies an expression to each item in an array and returns an array with the applied results.
$map
$geo
$geoRear
None of the mentioned
29. In the vars assignment block, ________ refers to the value of an externally defined variable low.
“$$low”
“$$lowin”
“$$1”
None of the mentioned
30. To avoid treating numeric or boolean literals as projection flags, use the _______ expression to wrap the numeric or boolean literals.
$literal
$bool
$unwin
None of the mentioned
31. MongoDB treats the literals as projection flags, valid only in the _______ stage.
$project
$gmap
$match
None of the mentioned
32. ____ expressions ignores the duplicate entries in each input array and the order of the elements.
set
boolean
aggregate
none of the mentioned
33. Point out the correct statement.
rsing ambiguity if the argument is a literal array, you must wrap the literal array in a $lits expression or keep the outer array that designates the argument list
rsing ambiguity if the argument is a literal array, you must wrap the literal array in a $lits expression or keep the outer array that designates the argument list
Operator expressions are similar to functions that take arguments
All of the mentioned
34. _______ returns true if the input sets have the same distinct elements.
$setUnion
$setDifference
$setEquals
None of the mentioned
35. Which of the following accepts any number of argument expression?
$setIntersection
$setDifference
$setEquals
None of the mentioned
36. Point out the wrong statement.
Boolean expressions evaluate their argument expressions as booleans and return a boolean as the result
In addition to the false boolean value, Boolean expression evaluates as false the following: null, 0, and undefined values
Set expressions performs set operation on arrays, treating arrays as sets
None of the mentioned
37. _____ returns a set with elements that appear in any of the input sets.
$setIntersection
$setDifference
$setEquals
$setUnion
38. Which of the following performs a relative complement of the second set relative to the first?
$setIntersection
$setDifference
$setEquals
$setUnion
39. $setIsSubset returns _______ if all elements of the first set appear in the second set, including when the first set equals the second set.
Null
True
False
None of the mentioned
40. _____ accepts only single argument expression.
$setIsSubset
$bool
$anyElementTrue
None of the mentioned
41. $allElementsTrue returns true if no element of a set evaluates to _______
false
true
0
1
42. Comparison expressions return a boolean except for ________ which returns a number.
$copy
$cmp
$num
None of the mentioned
43. Point out the correct statement.
The comparison expressions take two argument expressions and compare both value and type, using the specified Java comparison order for values of different types
$gte returns true if the first value is greater than the second
$gte returns true if the first value is greater than or equal to the second
$gte returns true if the first value is greater than or equal to the second
44. ____ returns true if the first value is less than the second.
$lte
$lt
$setEquals
None of the mentioned
45. $ne returns true if the values are not _______
equivalent
null
0
None of the mentioned
46. $multiply __________ numbers to return the result.
multiplies
divides
comapres
All of the mentioned
47. _____ adds numbers to return the sum, or adds numbers and a date to return a new date.
$addnum
$setadd
$adds
$add
48. _____ returns the remainder of the first number divided by the second.
$rem
$mod
$div
None of the mentioned
49. String expressions, with the exception of ________ only have a well-defined behavior for strings of ASCII characters.
$setcon
$concatenation
$concat
None of the mentioned
50. _____ subtracts two dates to return the difference in milliseconds.
$rem
$mod
$div
$subtract
Submit