Loading

Quipoin Menu

Learn • Practice • Grow

mongodb / Data Modeling Embedding vs Referencing
mcq
Direction: Choose the correct option

Q1.

What is embedding in MongoDB data modeling?
A. Creating indexes on nested fields
B. Encrypting data fields
C. Storing related data within a single document structure
D. Storing related data in a separate collection
Direction: Choose the correct option

Q2.

What is referencing in MongoDB?
A. Creating a pointer to another collection
B. Joining tables
C. Using foreign keys
D. Storing the `_id` of a related document in another document
Direction: Choose the correct option

Q3.

When is embedding generally preferred over referencing?
A. When you need to normalize data
B. When data has many-to-many relationships
C. When data is large and frequently changes
D. When data is frequently accessed together and has a one-to-many relationship
Direction: Choose the correct option

Q4.

What is a potential drawback of embedding too much data?
A. Document size growth leading to performance issues
B. Inability to query
C. Data duplication
D. Slower reads
Direction: Choose the correct option

Q5.

Given a blog post with multiple comments, what is a common way to model this in MongoDB?
A. Both approaches can be valid depending on access patterns
B. Use a relational database
C. Store comments in a separate collection with a reference to the post
D. Embed comments as an array in the post document