Tutorial Series: MongoDB

[This 15-chapter tutorial series is originally written for Tutorials Point]

Relationships in MongoDB represent how various documents are logically related to each other. Relationships can be modeled via Embedded and Referenced approaches. Such relationships can be either 1:1, 1: N, N: 1 or N: N.

Let us consider the case of storing addresses for users. So, one user can have multiple addresses making this a 1: N relationship.

Following is the sample document structure of user document:

Read my full tutorial series here.

Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s