What is the difference between embedded and referenced

Relations are associations between one model and another in the domain and in the database. 


Embedded relations describe documents who are stored inside other documents in the database. Embedded relations are associations between one or many objects where the child object is embedded within the parent in the same document in the database


Referenced relations describe documents that reference documents in another collection by storing data (usually an id) about the other document in itself. In other word Referenced relations are associations between documents that reside in separate collections.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s