

MCQOPTIONS
Saved Bookmarks
This section includes 49 Mcqs, each offering curated multiple-choice questions to sharpen your Mongodb knowledge and support exam preparation. Choose a topic below to get started.
1. |
MongoDB treats the literals as projection flags, valid only in the _______ stage. |
A. | $project |
B. | $gmap |
C. | $match |
D. | None of the mentioned |
Answer» B. $gmap | |
2. |
To avoid treating numeric or boolean literals as projection flags, use the _______ expression to wrap the numeric or boolean literals. |
A. | $literal |
B. | $bool |
C. | $unwin |
D. | None of the mentioned |
Answer» B. $bool | |
3. |
________ applies an expression to each item in an array and returns an array with the applied results. |
A. | $map |
B. | $geo |
C. | $geoRear |
D. | None of the mentioned |
Answer» B. $geo | |
4. |
Which of the following stages cannot appear multiple times in a pipeline? |
A. | $regex |
B. | $reg |
C. | $match |
D. | $out |
Answer» D. $out | |
5. |
Which of the following returns the value that results from applying an expression to the last document? |
A. | $end |
B. | $last |
C. | $max |
D. | All of the mentioned |
Answer» C. $max | |
6. |
$setIsSubset returns _______ if all elements of the first set appear in the second set, including when the first set equals the second set. |
A. | Null |
B. | True |
C. | False |
D. | None of the mentioned |
Answer» D. None of the mentioned | |
7. |
In MongoDB __________ mongos retrieves the results from each shard, performs a merge sort to order the results. |
A. | 3.0 |
B. | 2.0 |
C. | 1.0 |
D. | None of the mentioned |
Answer» C. 1.0 | |
8. |
You can only use jsMode for result sets with fewer than 500,000 distinct key arguments to the mapper’s _______ function. |
A. | emit() |
B. | emitter() |
C. | emitted() |
D. | none of the mentioned |
Answer» B. emitter() | |
9. |
Which of the following mode defaults to false? |
A. | jsMode |
B. | scope |
C. | finalize |
D. | min |
Answer» B. scope | |
10. |
$allElementsTrue returns true if no element of a set evaluates to ____________ |
A. | false |
B. | true |
C. | 0 |
D. | 1 |
Answer» B. true | |
11. |
__________ returns the day of the year for a date as a number between 1 and 366. |
A. | $dayofWeekend |
B. | $dayOfWeek |
C. | $dayOfYear |
D. | None of the mentioned |
Answer» D. None of the mentioned | |
12. |
________ subtracts two dates to return the difference in milliseconds. |
A. | $rem |
B. | $mod |
C. | $div |
D. | $subtract |
Answer» B. $mod | |
13. |
Which of the following accepts a single argument expression? |
A. | $toLow |
B. | $toUpper |
C. | $toEqual |
D. | None of the mentioned |
Answer» C. $toEqual | |
14. |
Which of the following returns a substring of a string? |
A. | $subs |
B. | $substring |
C. | $substr |
D. | None of the mentioned |
Answer» D. None of the mentioned | |
15. |
Which of the following performs case-insensitive string comparison? |
A. | $strcasecmpequals |
B. | $strcasecmp |
C. | $strcmp |
D. | None of the mentioned |
Answer» B. $strcasecmp | |
16. |
____________ works similar to HAVING clause in SQL. |
A. | $setcon |
B. | $group |
C. | $match |
D. | None of the mentioned |
Answer» D. None of the mentioned | |
17. |
________ passes the first n documents unmodified to the pipeline where n is the specified limit. |
A. | $skip |
B. | $limit |
C. | $match |
D. | $redact |
Answer» C. $match | |
18. |
Cursors returned from aggregation only supports cursor methods like ________________ |
A. | cursor.hasNext() |
B. | cursor.Next() |
C. | cursor.has() |
D. | all of the mentioned |
Answer» B. cursor.Next() | |
19. |
Syntax for specifying an initial batch size for the cursor is ________________ |
A. | cursor: { batchSize: <string> } |
B. | cursor: { batchSize: <int> } |
C. | cur: { batchSize: <int> } |
D. | none of the mentioned |
Answer» C. cur: { batchSize: <int> } | |
20. |
$sum is an accumulator operator available only in the _______ stage. |
A. | $group |
B. | $sets |
C. | $accumulator |
D. | None of the mentioned |
Answer» B. $sets | |
21. |
$dayOfMonth returns the day of the month for a date as a number between ________________ |
A. | 1 and 31 |
B. | 1 and 30 |
C. | 1 and 28 |
D. | None of the mentioned |
Answer» B. 1 and 30 | |
22. |
_______ reorders the document stream by a specified sort key. |
A. | $skip |
B. | $limit |
C. | $sort |
D. | None of the mentioned |
Answer» D. None of the mentioned | |
23. |
Which of the following is syntax for calculating minimum value? |
A. | { $minimum: <int> } |
B. | { $min: <expression>} |
C. | { $minimum: <expression> } |
D. | None of the mentioned |
Answer» C. { $minimum: <expression> } | |
24. |
Which of the following returns year for particular date? |
A. | $year |
B. | $yearday |
C. | $syearofmonth |
D. | None of the mentioned |
Answer» B. $yearday | |
25. |
Which of the following function follows the reduce method and modifies the output? |
A. | finalize |
B. | final |
C. | max |
D. | all of the mentioned |
Answer» B. final | |
26. |
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 |
Answer» C. 17 MB | |
27. |
Which of the following accepts named parameters? |
A. | $reduce |
B. | $letnum |
C. | $let |
D. | None of the mentioned |
Answer» E. | |
28. |
Which of the following accepts any number of argument expression? |
A. | $setIntersection |
B. | $setDifference |
C. | $setEquals |
D. | None of the mentioned |
Answer» B. $setDifference | |
29. |
Which of the following method is overrided by Index filters? |
A. | hint |
B. | plan |
C. | execute |
D. | all of the mentioned |
Answer» B. plan | |
30. |
Which of the following provides similar functionality to join? |
A. | $unwindelem |
B. | $unwind |
C. | $unwin |
D. | None of the mentioned |
Answer» D. None of the mentioned | |
31. |
________ limits the number of documents in result set. |
A. | $project |
B. | $geo |
C. | $limit |
D. | None of the mentioned |
Answer» D. None of the mentioned | |
32. |
Which of the following can be used to implement field level redaction? |
A. | $skip |
B. | $limit |
C. | $match |
D. | $redact |
Answer» E. | |
33. |
Which of the following statement is equivalent to “$$CURRENT.
|
A. | “$%<field>” |
B. | “%<field>” |
C. | “$$<field>” |
D. | “$<field>” |
Answer» E. | |
34. |
Which of the following ignores non numeric values? |
A. | $order |
B. | $sum |
C. | $asc |
D. | None of the mentioned |
Answer» C. $asc | |
35. |
Which of the following database command is used for mapreduce function? |
A. | mapReduce |
B. | mapperRed |
C. | redmap |
D. | none of the mentioned |
Answer» B. mapperRed | |
36. |
__________ specifies global variables that are accessible in the map. |
A. | jsMode |
B. | scope |
C. | finalize |
D. | Min |
Answer» C. finalize | |
37. |
Which of the operator is similar to order by clause in RDBMS? |
A. | $sort |
B. | $match |
C. | $sortby |
D. | None of the mentioned |
Answer» B. $match | |
38. |
Which of the following returns the hour for a date as a number between 0 and 23? |
A. | $minute |
B. | $hour |
C. | $seconds |
D. | All of the mentioned |
Answer» C. $seconds | |
39. |
In the vars assignment block, ________ refers to the value of an externally defined variable low. |
A. | “$$low” |
B. | “$$lowin” |
C. | “$$1” |
D. | None of the mentioned |
Answer» B. “$$lowin” | |
40. |
Which of the following operator is related to geography of data? |
A. | $geoSpatial |
B. | $geoNear |
C. | $geoRear |
D. | None of the mentioned |
Answer» C. $geoRear | |
41. |
Which of the following operation can be optionally used for map reduce? |
A. | finally |
B. | final |
C. | static |
D. | none of the mentioned |
Answer» B. final | |
42. |
TO_AVOID_TREATING_NUMERIC_OR_BOOLEAN_LITERALS_AS_PROJECTION_FLAGS,_USE_THE_________EXPRESSION_TO_WRAP_THE_NUMERIC_OR_BOOLEAN_LITERALS.?$ |
A. | $literal |
B. | $bool |
C. | $unwin |
D. | None of the mentioned |
Answer» B. $bool | |
43. |
MongoDB treats the literals as projection flags, valid only in the _______ stage.$ |
A. | $project |
B. | $gmap |
C. | $match |
D. | None of the mentioned |
Answer» B. $gmap | |
44. |
MongoDB_treats_the_literals_as_projection_flags,_valid_only_in_the_________stage.$ |
A. | $project |
B. | $gmap |
C. | $match |
D. | None of the mentioned |
Answer» B. $gmap | |
45. |
In the vars assignment block, ________ refers to the value of an externally defined variable low ? |
A. | ‚Äö√Ñ√∂‚àö√ë‚àö‚à?#$low‚Äö√Ñ√∂‚àö√ë‚àöœÄ |
B. | ‚Äö√Ñ√∂‚àö√ë‚àö‚à?#$lowin‚Äö√Ñ√∂‚àö√ë‚àöœÄ |
C. | ‚Äö√Ñ√∂‚àö√ë‚àö‚à?#$1‚Äö√Ñ√∂‚àö√ë‚àöœÄ |
D. | None of the mentioned |
Answer» B. ‚Äö√Ñ√∂‚àö√ë‚àö‚à?#$lowin‚Äö√Ñ√∂‚àö√ë‚àöœÄ | |
46. |
______ binds variables for use in the specified expression. |
A. | $skip |
B. | $let |
C. | $bind |
D. | None of the mentioned |
Answer» C. $bind | |
47. |
Which of the following statement is equivalent to “$$CURRENT.
|
A. | “$%<field>” |
B. | “%<field>” |
C. | “$$<field>” |
D. | “$<field>” |
Answer» E. | |
48. |
Aggregation expressions use ______ path to access fields in the input documents. |
A. | mpath |
B. | dbpath |
C. | lpath |
D. | field |
Answer» E. | |
49. |
Which of the following stages cannot appear multiple times in a pipeline ? |
A. | $regex |
B. | $reg |
C. | $match |
D. | $out |
Answer» D. $out | |