Member-only story
Sequelize: Like Mongoose But For SQL
The ORM For SQL Databases with Node.js

Everyone who’s ever built a MEAN or MERN stack app is probably familiar with Mongoose, the helpful object data modeling library that makes working with a MongoDB much, much easier. And since this application stack is so popular, there’s about a thousand tutorials (some much better than others) illustrating how to use MongoDB, Express, React (or Angular) and Node.js together.
Imagine my surprise though, when I decided to build a simple full stack app using MySQL (or SQLite or PostgreSQL or really any type of SQL database), and found almost nothing that made much sense on how to do so using Express and Node. Really? Nothing recent? Nothing with a deliberate, modularized architecture? No one seemed to have a good way of doing this — nothing short of actual SQL queries written out in the server.js
file to perform CRUD operations on the database.
Then, I found Sequelize. And everything changed. I wanted to share what I learned here, in hopes of saving some other people from the masses of outdated tutorials out there, unaware of how much easier Sequelize can make implementing a SQL database into their Node apps.
What is Sequelize?
Sequelize’s home page best sums up what exactly it is: