PACKAGE · ORM & DATABASE

drizzle-orm

Drizzle ORM package for SQL databases

WEEKLY DOWNLOADS 47.8M
STARS 36.4K
FORKS 1.8K
OPEN ISSUES 2.1K
GZIP SIZE 8.2 kB
UNPACKED SIZE 10.5 MB
DEPENDENCIES 0
LAST UPDATED 8mo ago
DOWNLOAD TRENDS

drizzle-orm downloads · last 12 months

Download trends for drizzle-orm1 download series from Nov 2025 to Oct 2026. Use left and right arrow keys to inspect monthly values.035.4M70.9M106.3M141.8MNov 2025FebMayAugOct 2026
drizzle-orm
ABOUT DRIZZLE-ORM

Drizzle ORM is a TypeScript ORM for SQL databases, providing a way to define database schemas and construct queries in application code. It addresses the gap between writing SQL directly and using an ORM abstraction by keeping its query model closely tied to SQL concepts while supporting typed access to database operations.

Its design is aimed at developers who want schema and query definitions that work naturally with TypeScript and SQL. The package covers PostgreSQL, MySQL, and SQLite-related databases, with topics also including Turso, Bun, and Node.js; choose the matching database-specific integration for the engine your application uses.

A common workflow is to declare tables and columns with the relevant schema APIs, then use the `db` query interface to select, insert, update, or delete records. Drizzle provides both SQL-like query methods and a relational query API, allowing queries to be expressed through typed builders or in a more relational style; schema definitions can also serve as a reference point for application types.

Drizzle ORM fits into TypeScript services and applications that connect to SQL databases, including projects using Bun or Node.js. It can be used alongside existing SQL-oriented workflows, but database connections, driver setup, migrations, and deployment practices still depend on the selected database and runtime; check the documentation for the appropriate dialect and adapter.

The package reports a gzip bundle size of 8.2 kB and an unpacked size of 10.5 MB, so the compressed bundle figure should not be treated as the full installed footprint. Its 13.2 million weekly downloads and 36.1 thousand GitHub stars indicate substantial usage, while 2.2 thousand open issues are relevant context for evaluating maintenance and troubleshooting. The supplied metadata lists version 0.45.4, Apache-2.0 licensing, and an update date of 2026-10-20; validate release and database-driver compatibility before adopting it.

WHEN TO USE
  • When defining SQL tables and columns in TypeScript, use Drizzle's schema APIs to keep database structure close to application code.
  • When you want query expressions that resemble SQL, use the typed `db.select()`, `db.insert()`, `db.update()`, and `db.delete()` builder patterns.
  • When working with PostgreSQL, MySQL, or SQLite-related databases, select the corresponding Drizzle dialect and connection integration for the target engine.
  • When a project needs relationally shaped reads, use Drizzle's relational query API rather than assembling every result shape manually.
  • When you want TypeScript types derived from database schema definitions, use the schema as the source for table and query typing.
  • When integrating SQL access into a Bun or Node.js application, evaluate Drizzle's database-specific driver setup against the runtime and deployment environment.
  • When keeping SQL visible and understandable is a priority, use Drizzle's SQL-like query builders instead of hiding query structure behind a domain-specific abstraction.
WHEN NOT TO USE
  • If your application uses a non-SQL database, Drizzle's SQL database focus is a mismatch; use that database's native client or an ORM designed for its data model.
  • If developers need a fully abstracted persistence layer without SQL-oriented schema and query concepts, choose a higher-level data access approach or keep SQL behind a repository boundary.
  • If your team depends on a specific database engine or driver that is not supported by the required Drizzle dialect, use the engine's supported client or verify compatibility before adopting Drizzle.
  • If migration generation and deployment must follow a prescribed workflow, confirm Drizzle's migration tooling supports it; otherwise use your existing migration process and maintain schema changes separately.
  • If minimizing the installed package footprint is a strict requirement, assess the 10.5 MB unpacked size rather than relying on the listed 8.2 kB gzip bundle figure, and consider a narrower database-specific integration.
  • If your project cannot accommodate checking database-adapter compatibility across Bun or Node.js, use a client with a verified setup for your exact runtime and database combination.
  • If you require a release whose issue status and maintenance history have been independently reviewed, inspect the current project status before choosing the listed 0.45.4 version.

CORRECTIONS

Spot wrong data here?

A short note helps us fix it.

Anonymous · No account · No email back

COMPARISONS 6
drizzle-orm vs sequelize ★ 30.3K · 4.3M/wk drizzle-orm vs prisma ★ 26 · 25.3M/wk drizzle-orm vs typeorm ★ 36.7K · 7.3M/wk drizzle-orm vs kysely ★ 14.4K · 31.4M/wk drizzle-orm vs mongoose ★ 27.5K · 8.8M/wk drizzle-orm vs knex ★ 20.3K · 7.1M/wk