A word about Mongoose
Mongoose is technically not an ORM (Object Relational Mapping) though it’s commonly referred to as one. Rather, it is an ODM (Object Document Mapping) since MongoDB itself is based in documents instead of relational tables. The idea behind ODM’s and ORM’s is the same, though: providing an easy-to-use solution for data modelling.
Mongoose works with the notion of “schemas.” A schema is simply an object that defines a collection (a group of documents) and the properties and allowed types of values that the document instances will have (i.e. what we would call “their shape.”).
Mongoose and Nest.js
Just like we saw in the TypeORM and the Sequelize chapters, Nest.js provides us with a module that we can use with Mongoose.