RANIARANIA Academy

Working with Databases in Node

Persist application data from Node into real databases — connect to PostgreSQL with the node-postgres driver, run safe parameterised queries, and pool connections for performance. Layer an ORM such as Prisma or Sequelize on top, understand migrations, and store documents in MongoDB with Mongoose. You finish able to design and build the data-access layer of a production Node service.

Watch the free preview

Connecting and running parameterised queries — free to watch, no account needed.

Node.js INTERMEDIATE · 150 min · Certificate on completion · 3 CPD points

What you'll learn

  • Persist application data in PostgreSQL and MongoDB from a Node application
  • Run parameterised SQL with node-postgres to prevent SQL injection
  • Manage database connections efficiently with a connection pool
  • Model data and run migrations with an ORM such as Prisma or Sequelize
  • Structure persistence behind a clean data-access layer with transactions

Syllabus

Talking to PostgreSQL from Node
Connecting and running parameterised queriesFree preview15 min
Connection pooling with pg.Pool15 min
Structuring Persistence — Layers and Transactions
Building a data-access layer15 min
Transactions and data integrity15 min
Working at a Higher Level — ORMs
Prisma — a schema-first ORM with migrations15 min
Sequelize — a model-first ORM15 min
Documents and Production-Ready Persistence
MongoDB with Mongoose as an alternative15 min
Making persistence production-ready15 min
Lab — 10 Exercises & Solutions
Exercises 1–515 min
Exercises 6–1015 min