Sequelize for node.js

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

ApproachDatabase / Programming focusedHands-on managementLevel of abstractionLevel of complexity
Raw SQLdatabase-orientedhighnonelow
Query buildersmixedlowlowlow
ORMsprogramming-orientedlowhighhigh
https://www.prisma.io/dataguide/types/relational/comparing-sql-query-builders-and-orms
  • Again, Sequelize is ORMs

Example of Query Builder for node: node-querybuilder

$ npm install node-querybuilder

Leave a Reply

Your email address will not be published.

ANOTE.DEV