talira

Sequelize

Feature-rich ORM for modern TypeScript and JavaScript

open sourceMITfree

Sequelize is an ORM for Node.js and TypeScript that works with Oracle, PostgreSQL, MySQL, MariaDB, SQLite and SQL Server, among others. You define models, optionally let it synchronise the tables, and persist and query rows through them, with associations between models, eager and lazy loading, transactions and read replication. Version 6 is the stable release and version 7 is in alpha.

Problems it solves

  • map the objects in my Node.js app to rows in a Postgres or MySQL database
  • define database models and relations in TypeScript instead of writing raw SQL
  • run transactions and eager-load related records from a Node.js backend

Features

  • models and associations
  • eager and lazy loading
  • transactions
  • read replication
  • automatic table synchronisation
  • many SQL databases

Alternatives

The same job

These do what Sequelize does.

  1. Prisma ORM One schema. Every query type-safe.
  2. MikroORM TypeScript ORM for Node.js built on Data Mapper, Unit of Work and Identity Map
  3. TypeORM TypeScript ORM with DataMapper and ActiveRecord patterns
  4. sqlc Compile SQL to type-safe code
  5. Drizzle ORM Lightweight, type-safe TypeScript ORM for SQL databases

Compare Sequelize with the top 3