MongoDB MCQ Quiz Hub

MongoDB Mcq Question Set 12

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

Which of the following returns a substring of a string?





✅ Correct Answer: 3

. Point out the correct statement.





✅ Correct Answer: 2

Which of the following accepts a single argument expression?





✅ Correct Answer: 2

Which of the following performs case-insensitive string comparison?





✅ Correct Answer: 1

Point out the wrong statement.





✅ Correct Answer: 4

______ is used for access text search metadata.





✅ Correct Answer: 3

Which of the following accepts named parameters?





✅ Correct Answer: 4

____ returns the number of elements in the array.





✅ Correct Answer: 2

_____ returns a value without parsing.





✅ Correct Answer: 2

db.collection.aggregate() returns a _______ and can return result sets of any size.





✅ Correct Answer: 2

The _____ JavaScript engine allows multiple JavaScript operations to execute at the same time.





✅ Correct Answer: 1

Point out the correct statement.





✅ Correct Answer: 2

If the ______ field for mapReduce has the sharded value, MongoDB shards the output collection using the _id field as the shard key.





✅ Correct Answer: 3

In MongoDB __________ mongos retrieves the results from each shard, performs a merge sort to order the results.





✅ Correct Answer: 2

Point out the wrong statement.





✅ Correct Answer: 4

Which of the following function follows the reduce method and modifies the output?





✅ Correct Answer: 1

______ specifies global variables that are accessible in the map.





✅ Correct Answer: 2

MongoDB converts the JavaScript objects emitted by the map function to ________ objects.





✅ Correct Answer: 1

You can only use jsMode for result sets with fewer than 500,000 distinct key arguments to the mapper’s _______ function.





✅ Correct Answer: 1

Which of the following mode defaults to false?





✅ Correct Answer: 1

$dayOfMonth returns the day of the month for a date as a number between _____





✅ Correct Answer: 1

Point out the wrong statement.





✅ Correct Answer: 3

_____ returns the day of the year for a date as a number between 1 and 366.





✅ Correct Answer: 3

Which of the following returns year for particular date?





✅ Correct Answer: 1

Point out the wrong statement.





✅ Correct Answer: 2

Which of the following returns the hour for a date as a number between 0 and 23?





✅ Correct Answer: 2

______ returns the date as a formatted string.





✅ Correct Answer: 2

___ result encompasses instances of undefined values or missing fields.





✅ Correct Answer: 3

______ returns either the non-null result of the first expression.





✅ Correct Answer: 2

______ take as input a single expression, evaluating the expression once for each input document, and maintain their state for the group of documents.





✅ Correct Answer: 3

$sum is an accumulator operator available only in the _______ stage.





✅ Correct Answer: 1

Point out the wrong statement.





✅ Correct Answer: 3

Which of the following ignores non numeric values?





✅ Correct Answer: 2

When using $first in a $group stage, the $group stage should follow a _______ stage to have the input documents in a defined order.





✅ Correct Answer: 2

Which of the following returns the value that results from applying an expression to the last document?





✅ Correct Answer: 2

______ returns the highest value from the group of values in documents.





✅ Correct Answer: 3

Which of the following is syntax for calculating minimum value?





✅ Correct Answer: 2

If all documents for the $min operation have null value for the field or are missing the field, the $min operator returns ____ for the minimum value.





✅ Correct Answer: 3

$addToSet returns an array of all _______ values that results from applying an expression to each document.





✅ Correct Answer: 1

____ references the root document, i.e. the top-level document, currently being processed in the aggregation pipeline stage.





✅ Correct Answer: 2

Point out the wrong statement.





✅ Correct Answer: 4

Which of the operator is similar to order by clause in RDBMS?





✅ Correct Answer: 1

Which of the following provides similar functionality to join?





✅ Correct Answer: 3

Point out the wrong statement.





✅ Correct Answer: 3

_____ limits the number of documents in result set.





✅ Correct Answer: 3

Which of the following is used to retrieve like SELECT clause in SQL?





✅ Correct Answer: 3

____ groups documents by some specified expression and outputs to the next stage a document for each distinct grouping.





✅ Correct Answer: 2

______ works similar to HAVING clause in SQL.





✅ Correct Answer: 3

COUNT function is provided by _________ in MongoDB.





✅ Correct Answer: 2

MongoDB indexes use a _______ data structure.





✅ Correct Answer: 2