Sail E0 Webinar

MCQs

Total Questions : 13 | Page 1 of 2 pages
Question 1. Which of the following returns the value that results from applying an expression to the last document ?
  1.    $end
  2.    $last
  3.    $max
  4.    All of the mentioned
 Discuss Question
Answer: Option B. -> $last


$last has the following syntax: { $last: }.


Question 2. Point out the wrong statement :
  1.    Boolean expressions evaluate their argument expressions as booleans and return a boolean as the result
  2.    In addition to the false boolean value, Boolean expression evaluates as false the following: null, 0, and undefined values
  3.    Set expressions performs set operation on arrays, treating arrays as sets
  4.    None of the mentioned
 Discuss Question
Answer: Option D. -> None of the mentioned


The Boolean expression evaluates all other values as true, including non-zero numeric values and arrays.


Question 3. Point out the wrong statement :
  1.    CURRENT references the start of the field path being processed in the aggregation pipeline stage
  2.    All stages start with CURRENT the same as ROOT
  3.    DESCENDING is one of the allowed results of a $let expression
  4.    None of the mentioned
 Discuss Question
Answer: Option C. -> DESCENDING is one of the allowed results of a $let expression


However, since $ is equivalent to $$CURRENT., rebinding CURRENT changes the meaning of $ accesses.


Question 4. Which of the following accepts named parameters ?
  1.    $reduce
  2.    $letnum
  3.    $let
  4.    None of the mentioned
 Discuss Question
Answer: Option D. -> None of the mentioned


$let defines variables for use within the scope of a subexpression and returns the result of the subexpression.


Question 5. Point out the wrong statement :
  1.    Some pipeline stages may generate new documents or filter out documents
  2.    $limit groups output documents by a specified operator
  3.    $group groups input documents by a specified identifier expression
  4.    None of the mentioned
 Discuss Question
Answer: Option B. -> $limit groups output documents by a specified operator


$group consumes all input documents and outputs one document per each distinct group.


Question 6. In the vars assignment block, ________ refers to the value of an externally defined variable low .
  1.    $$low"
  2.    $$lowin"
  3.    $$1"
  4.    None of the mentioned
 Discuss Question
Answer: Option D. -> None of the mentioned


If low is not defined outside this $let expression block, the expression is invalid.


Question 7. ______ can be used to iterate the cursor of document results returned by db.collection.find().
  1.    it
  2.    next
  3.    cur
  4.    None of the mentioned
 Discuss Question
Answer: Option A. -> it


The mongo shell iterates the returned cursor automatically to print the results.


Question 8. The most basic pipeline stages provide __________ that operate like queries.
  1.    methods
  2.    filters
  3.    stored procedure
  4.    None of the mentioned
 Discuss Question
Answer: Option B. -> filters


Other pipeline operations provide tools for grouping and sorting documents by specific field.


Question 9. Which of the following function follows the reduce method and modifies the output ?
  1.    finalize
  2.    final
  3.    Max
  4.    All of the mentioned
 Discuss Question
Answer: Option A. -> finalize


Finalize fucntion is optional for mapreduce operation.


Question 10. Which of the following accepts named parameters ?
  1.    $reduce
  2.    $letnum
  3.    $let
  4.    None of the mentioned
 Discuss Question
Answer: Option D. -> None of the mentioned


$let defines variables for use within the scope of a subexpression and returns the result of the subexpression.


Latest Videos

Latest Test Papers