12

Using Databases

In this chapter, I will demonstrate how Node.js applications can use a relational database to store and query data. This chapter explains how to work directly with a database by executing SQL queries, and how to take a more hands-off approach with an Object Relational Mapping (ORM) package. Table 12.1 puts this chapter into context.

Table 12.1: Putting databases into context

Question

Answer

What are they?

Databases are the most common means of persistently storing data.

Why are they useful?

Databases can store large volumes of data and enforce a data structure that makes it possible to perform efficient queries.

How are they used?

Databases are managed by database engines, which can be installed as ...

Get Mastering Node.js Web 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.