Sequelize is a promise-based Node.js ORM for Postgres, MySQL, MariaDB, SQLite, and Microsoft SQL Server. It features solid transaction support, relations, eager and lazy loading, read replication, and more.
$ npm install --save sequelize
Raw SQL vs Query builders vs ORMs
Approach | Database / Programming focused | Hands-on management | Level of abstraction | Level of complexity |
---|---|---|---|---|
Raw SQL | database-oriented | high | none | low |
Query builders | mixed | low | low | low |
ORMs | programming-oriented | low | high | high |
- Again, Sequelize is ORMs
Example of Query Builder for node: node-querybuilder
$ npm install node-querybuilder