Summary
In this chapter, I explained how a JavaScript web application can use a database, both directly using SQL and indirectly using an ORM package.
- Databases are the most common choice for persistent data storage.
- Node.js can be used with popular database engines, for which there is a wide range of open-source packages.
- Databases can be used directly or through packages that express data as objects and generate queries automatically.
- A basic knowledge of how databases work and the ability to understand the core SQL syntax makes it easier to work with databases, even when an ORM package is used.
In the next chapter, I will describe how related HTTP requests can be identified to create sessions.