MongoDB MCQ Quiz Hub

MongoDB Mcq Question Set 12

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

1. Which of the following returns a substring of a string?




2. . Point out the correct statement.




3. Which of the following accepts a single argument expression?




4. Which of the following performs case-insensitive string comparison?




5. Point out the wrong statement.




6. ______ is used for access text search metadata.




7. Which of the following accepts named parameters?




8. ____ returns the number of elements in the array.




9. _____ returns a value without parsing.




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




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




12. Point out the correct statement.




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




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




15. Point out the wrong statement.




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




17. ______ specifies global variables that are accessible in the map.




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




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




20. Which of the following mode defaults to false?




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




22. Point out the wrong statement.




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




24. Which of the following returns year for particular date?




25. Point out the wrong statement.




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




27. ______ returns the date as a formatted string.




28. ___ result encompasses instances of undefined values or missing fields.




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




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




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




32. Point out the wrong statement.




33. Which of the following ignores non numeric values?




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




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




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




37. Which of the following is syntax for calculating minimum value?




38. 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.




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




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




41. Point out the wrong statement.




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




43. Which of the following provides similar functionality to join?




44. Point out the wrong statement.




45. _____ limits the number of documents in result set.




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




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




48. ______ works similar to HAVING clause in SQL.




49. COUNT function is provided by _________ in MongoDB.




50. MongoDB indexes use a _______ data structure.