I've been looking through the official Node.js documentation for guidance on connecting to and working with databases, but I can't find a dedicated database-integration section. Is this covered somewhere in the Node.js docs, or should I be using separate documentation?
3 Answers
Use the documentation for the specific driver rather than expecting Node’s documentation to explain every database protocol. Start by connecting to a local database and running a parameterized query. Drivers also commonly provide connection pooling. Once an application has many models and migrations, an ORM can be useful, but it adds abstraction and can make the underlying SQL less obvious.
There are a few common levels of abstraction. Database drivers such as pg, mysql2, and mongodb let you send queries directly. Query builders such as Knex or Kysely provide a JavaScript API that generates SQL. ORMs and ODMs such as Prisma, Drizzle, or Mongoose add models, migrations, and more structure. For learning or debugging, starting with the driver is usually the clearest approach.
Node.js itself doesn’t include a general database layer, so the core documentation doesn’t have a dedicated database-integration section. You normally install a client library for the database you’re using and follow its documentation—for example, pg for PostgreSQL, mysql2 for MySQL, or a SQLite library for SQLite.

That explains why I couldn’t find a database section in the core API docs. I’ll start with the driver documentation for the database I choose.