This set of MongoDB Multiple Choice Questions & Answers (MCQs) focuses on “Data Modeling Introduction”.
1. ________ 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.
2. Point out the correct statement.
a) In practice, the documents in a collection share a different structure
b) Data in MongoDB has a flexible schema
c) The key challenge in data modeling is balancing the needs of the application, the performance characteristics of the database engine, and the data retrieval patterns
d) None of the mentioned
Explanation: MongoDB’s collections do not enforce document structure.
3. In MongoDB, write operations are atomic at the __________ level.
d) all of the mentioned
Explanation: No single write operation can atomically affect more than one document or more than one collection.
4. ______________ documents capture relationships between data by storing related data in a single document structure.
Explanation: MongoDB documents make it possible to embed document structures in a field or array within a document.
5. Point out the wrong statement.
a) The key decision in designing data models for MongoDB applications revolves around the structure of documents and how the application represents relationships between data
b) There are two tools that allow applications to represent these relationships: references and embedded documents
c) When designing data models, always consider the application usage of the data (i.e. queries, updates, and processing of the data) as well as the inherent structure of the data itself
d) All of the mentioned
Explanation: Denormalized data models allow applications to retrieve and manipulate related data in a single database operation.
6. A ____________ data model with embedded data combines all related data for a represented entity in a single document.
c) non relational
Explanation: This facilitates atomic write operations since a single write operation can insert or update the data for an entity.
7. For the __________ storage engine, if the document size exceeds the allocated space for that document, MongoDB relocates the document on disk.
Explanation: Normalizing the data would split the data across multiple collections and would require multiple write operations that are not atomic collectively.
8. With MongoDB 3.0.0, the default use of the Power of _________ Allocations minimizes the occurrences of re-allocations as well as allows for the effective reuse of the freed record space.
a) 2 Sized
b) 3 Sized
c) 4 Sized
d) 5 Sized
Explanation: When using MMAPv1, if your applications require updates that will frequently cause document growth to exceeds the current power of 2 allocation, you may want to refactor your data model to use references between data in distinct documents rather than a denormalized data model.
9. ___________ strategy is used to explicitly avoid document growth.
d) none of the mentioned
Explanation: A data model that embeds related data in a single document facilitates atomic operations.
10. Each index in MongoDB requires at least _________ of data space.
Explanation: Adding an index has some negative performance impact for write operations.
Sanfoundry Global Education & Learning Series – MongoDB.
Here’s the list of Best Books in MongoDB.
- Get Free Certificate of Merit in MongoDB
- Participate in MongoDB Certification Contest
- Become a Top Ranker in MongoDB
- Take MongoDB Tests
- Chapterwise Practice Tests: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
- Chapterwise Mock Tests: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
- Buy Information Technology Books
- Apply for Programming Internship
- Apply for MongoDB Internship
- Practice Programming MCQs
- Buy MongoDB Books