Chapter 10. Complex Schemas
In this chapter, we will explore the ways in which Mongoose can help you manage more complex data models. MongoDB is not a relational database, so there are no SQL-style JOIN
commands. Instead, we will introduce the concepts of population and subdocuments, exploring how they are used.
By the end of this chapter, you will understand the differences between the two, and when each type is appropriate. We will also have added examples to our MongoosePM application.
Population – references to other collections
MongoDB and Mongoose do not support JOIN
commands as MongoDB is not a relational database. Mongoose gives you an elegant way to achieve similar functionality by using population.
Note
The concept of Population was dramatically ...
Get Mongoose for Application Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.