Mongoose Relationships

About

In this module, you will explore the fundamentals of data relationships in a NoSQL context. This content covers various aspects of managing relationships in MongoDB, from embedding and manipulating subdocuments to understanding and implementing document referencing.

By the end of this module, you’ll have a robust understanding of how to efficiently structure and interact with related data in Mongoose, preparing you for more complex database management in your full-stack applications. This module is designed for intermediate learners already familiar with MongoDB and Mongoose.

Content

Lesson Skills
Setup Setting up the development environment
Concepts Understand how entities can be related in MongoDB
Embedding Understand how to embed subdocuments in a Mongoose schema
Locating Embedded Subdocuments Retrieve embedded subdocuments using an id
Removing Embedded Subdocuments Remove embedded subdocuments by id
Updating Embedded Subdocuments Update embedded subdocuments by id
Finding a Parent From the Child Finding a parent document based on the properties of a child
Referencing Understand referencing related data in MongoDB
Adding References Create relationships through referenced documents
Joining Referenced Documents Retrieve referenced documents using the populate() method

References

📖 Reference Materials