Explain it in 60 seconds
Embedding vs referencing in MongoDB
Backend Engineering · NoSQL and Redis · Beginner
In MongoDB, when should you embed related data in a document versus referencing another document?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Embed: data read together, bounded size.
- Reference: large, unbounded or shared data.
- 16 MB document limit.
- Embedding avoids extra queries.
- Referencing avoids duplication.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.