Docs Menu
Docs Home
/ /

Document Relationships

MongoDB's flexible data model gives you multiple options to map relationships between different entities in your schema.

Generally, your choice of data model depends on whether you want to embed related data in the same collection or use references to connect related data that exists in separate collections. Before you choose a relationship pattern, review Link Related Data to understand the advantages of each approach.

These pages show examples of different data relationships and how to apply them in a MongoDB schema:

Back

Reduce $lookup Operations

On this page