Relationships in MongoDB are something that creates a linkage between two or more documents that we create. In other words, Relationships in MongoDB can be defined as different documents that are linked logically.
MongoDB Relationships Types
Different types of relationships that we have in MongoDB are:
- One to One
- One to Many
- Many to One
- Many to Many
Approaches for Data Modeling

1) Embedded Approach (Denormalization Approach)
This approach follows maintaining all the related data stored inside a single document in the form of embedded documents. This approach is followed if we have to deal with the following relationships in MongoDB:
- One to OneĀ
- One to Many
However, we are going to discuss all the types of these relationships in the latter part of this course, individually.
2) Referenced Approach (Normalized Approach)
This approach follows maintaining all the related data in other separate documents. Also, the related documents are connected to each other by passing a common '_id' key of the child document in the parent document. This approach is followed if we have to deal with the following relationships in MongoDB:
- Many to One
- Many to Many