MongoDB MCQ Test: MongoDB MCQs - Practice Questions
1. What is the purpose of the `ttl` index type in MongoDB?
2. What is the purpose of the `explain()` method in MongoDB?
3. How can you perform a multi-field sort in MongoDB?
4. What is sharding in MongoDB?
5. What does NoSQL stand for in the context of databases?
6. What is the purpose of the `db.currentOp()` method in MongoDB?
7. Which command is used to create a new database in MongoDB?
8. In MongoDB, what is the purpose of the `explain()` method?
9. What is the role of the WiredTiger storage engine in MongoDB?
10. How does MongoDB handle data consistency in a distributed environment?
11. Explain the concept of readConcern in MongoDB and its impact on data consistency.
12. What is the purpose of the `$elemMatch` operator in MongoDB?
13. Which operator is used for equality in MongoDB queries?
14. Explain the significance of the ObjectId in MongoDB documents.
15. How does MongoDB handle transactions, and what types of operations support transactions?
16. Which command is used to remove a document from a collection in MongoDB?
17. What is the purpose of the explain() method in MongoDB?
18. What is a sharded cluster in MongoDB, and why might it be used?
19. How can you limit the number of documents returned in a MongoDB query?
20. What is the purpose of the `text` index type in MongoDB?
21. In MongoDB, what is the primary role of the `mongos` process?
22. In MongoDB, what is the role of the WiredTiger storage engine?
23. What does the term 'Atlas' refer to in MongoDB?
24. Explain the purpose of the $lookup stage in the MongoDB aggregation pipeline.
25. Explain the concept of sharding in MongoDB and when it is beneficial.
26. In MongoDB, what does the `dbStats()` command provide?
27. What is a covered query in MongoDB?
28. What is the syntax for creating an ascending index on a field in MongoDB?
29. How can you update a document in MongoDB?
30. What is the significance of the GridFS in MongoDB?
31. In MongoDB, how do you create a compound index?
32. What is the role of the Mongoose library in MongoDB?
33. What is the purpose of the `aggregate()` method in MongoDB?
34. What does the term 'BSON' stand for in MongoDB?
35. Which authentication mechanism is commonly used in MongoDB?
36. What is the purpose of the `db.createView()` method in MongoDB?
37. Which aggregation stage is used to group documents by a specific field?
38. What is the purpose of the `$in` operator in MongoDB?
39. What is the purpose of the $redact stage in MongoDB aggregation?
40. What is the primary purpose of MongoDB?