MongoDB MCQ Questions - Data Modeling
This section focuses on "Data Modeling" in MongoDB. These Multiple Choice Questions (MCQ) should be practiced to improve the MongoDB skills required for various interviews (campus interview, walk-in interview, company interview), placements, entrance exams and other competitive examinations.
1. Each index in MongoDB requires at least _________ of data space.
Explanation: Adding an index has some negative performance impact for write operations.
2. In MongoDB, At which level write operations are atomic?
Explanation: No single write operation can atomically affect more than one document or more than one collection.
3. ________ store the relationships between data by including links or references from one document to another.
Explanation: Applications can resolve these references to access the related data. Broadly, these are normalized data models.
4. The limit on the number of namespaces depend on the ?
Explanation: The limit on the number of namespaces depend on the <database>.ns size.
5. The namespace file defaults to ?
Explanation: MongoDB using the mmapv1 storage engine has limits on the number of namespace.The namespace file defaults to 16 MB.
6. _______index allows efficient retrieval of chunks using the files_id and n values.
Explanation: GridFS index allows efficient retrieval of chunks using the files_id and n values.
7. How many does collections GridFS use to store files?
Explanation: One collection stores the file chunks, and the other stores file metadata
8. Which of the following checks and repairs errors and inconsistencies in data storage?
Explanation: repairDatabase is analogous to an fsck command for file systems.
9. GridFS is useful only for storing files that exceed 16MB
Explanation: GridFS is useful not only for storing files that exceed 16MB but also for storing any files for which you want to access without having to load the entire file into memory.
10. The key consideration for the structure of your documents is the decision to embed or to use references
Explanation: Effective data models support your application needs.