Chapter 4. Interacting with Data – an Introduction
We have seen how to define our data structure, but now we want to interact with it. We want to be able to create database entries, read them, update them, and delete them. To handle these interactions, Mongoose uses methods added to models. This chapter introduces the concept and will look at how to organize our code to best work with this approach.
By the end of this chapter, you will have had a glimpse of how Mongoose helps you to easily interact with your data. You will also have prepared the sample project so that we can dive into practical examples in later chapters.