Question 1
In MongoDB, what is the equivalent of a table in a relational database?
- Document
- Field
- Collection
- Index
- Database
Question 2
Which data type is most suitable for storing an array of product IDs in a MongoDB document?
- String
- Number
- Array
- Object
- Boolean
Question 3
What is the primary benefit of embedding documents in MongoDB?
- Reduced storage space
- Simplified queries for related data
- Increased data redundancy
- Improved data security
- Elimination of indexes
Question 4
When should you consider using document referencing over embedding in MongoDB?
- When the related data is small and rarely changes
- When you need to query related data frequently
- When the relationship is one-to-one
- When the relationship is many-to-many or one-to-many and data grows significantly
- When you want to avoid joins
Question 5
What is the purpose of the `$lookup` aggregation pipeline stage in MongoDB?
- To update multiple documents
- To perform a left outer join to another collection
- To filter documents based on a condition
- To sort documents in ascending order
- To project specific fields in a document
Question 6
Which of the following is NOT a consideration when designing a schema for MongoDB?
- Data access patterns
- Data relationships
- Data size
- Database vendor (Oracle, MySQL)
- Read and write ratios
Question 7
What is the purpose of denormalization in MongoDB data modeling?
- To reduce data redundancy
- To improve query performance by avoiding joins
- To enforce strict data consistency
- To minimize storage space
- To simplify data validation
Question 8
In MongoDB, what is the maximum document size limit?
- 4 MB
- 8 MB
- 16 MB
- 32 MB
- 64 MB
Question 9
Which data modeling approach is preferable if you need to ensure strong consistency across related data?
- Embedding
- Referencing
- Denormalization
- Normalization
- Polymerization
Question 10
Consider a blog application. Which approach is generally better for storing comments related to a post: embedding comments within the post document, or referencing comments in a separate 'comments' collection?
- Embedding, because comments are usually short and retrieval is faster.
- Referencing, because comments can grow unboundedly and impact post document size.
- Embedding, to normalize the comments.
- Referencing, only if you want to enable different databases for posts and comments.
- Embedding, it's better for consistency.