Drizzle ORM: A Headless TypeScript ORM That Stays Close to SQL
ORM
At a glance
- What is it?
- Drizzle ORM is a lightweight, dependency-free TypeScript ORM for PostgreSQL, MySQL, and SQLite. It targets serverless runtimes and developers who want type safety without hiding the underlying SQL.
- Who is it for?
- Adopt Drizzle ORM if you work in TypeScript across Node, Bun, Deno, or edge runtimes, need a small bundle, and prefer writing SQL-like queries over magic. Skip it if you want an ORM that hides SQL behind a high-level API or if you rely on a mature, stable 1.0 release, since the project is still in release candidates as of the v1.0.0-rc.5 release in October 2026.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 1 day ago.
- What is it written in?
- Mainly TypeScript, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.
Star history
- drizzle-team/drizzle-orm36,280 ★ · +774
| Repository | 2026-08-18 | 2026-11-15 |
|---|---|---|
| drizzle-team/drizzle-orm | 35.5k | 36.3k |
774 Stars in the last 89 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
The Problem: ORMs That Hide SQL or Drag in Dependencies
Most TypeScript ORMs sit between you and your database, translating method calls into queries. That approach can be convenient, but it adds layers, often with a runtime cost. Drizzle ORM takes a different stance. The README calls it a headless ORM, meaning it provides a thin typed layer on top of SQL rather than a full abstraction. The target user is a developer who knows SQL, wants type safety, and does not want a framework deciding how queries are generated. That is especially relevant for serverless environments, where cold starts and bundle size matter. Drizzle claims a minified and gzipped size of about 7.4kb and exactly zero dependencies. For a project that runs on Cloudflare Workers or Lambda, that difference can be measurable. The problem it solves is not the absence of ORMs, it is the absence of a lightweight ORM that does not obscure the query language.
How Drizzle Works: Schema Declaration and Query Builders
You declare SQL schemas in TypeScript. The documentation describes two query styles: relational queries and SQL-like queries. Relational queries let you express joins and nested relations with a fluent API. SQL-like queries mirror the structure of a SELECT statement, so you write select, from, where, and join methods that map closely to SQL keywords. This design keeps the ORM thin because it does not need a query planner or an object graph mapper. The type system does the heavy lifting, turning your schema declarations into types that constrain valid queries. The README describes it as lightweight and tree shakeable with exactly 0 dependencies. The README emphasizes that it works in browsers and edge runtimes, which is consistent with a design that avoids Node-specific dependencies. The trade-off is that you must learn Drizzle's query builder methods, which are not exactly SQL syntax, but they are close enough that a SQL user can predict the generated query.
Getting Started: Installation and First Commands
The README does not include installation commands, but the documentation site provides get-started guides for each database. Based on the repository layout and the ecosystem described, the typical setup involves installing drizzle-orm and a database driver. For PostgreSQL, that would be something like pg or postgres.js. For MySQL, mysql2. For SQLite, better-sqlite3 or libsql for Turso. You declare SQL schemas in TypeScript, and the README links to the documentation site for connecting each database. Migrations are handled by Drizzle Kit, a separate CLI companion. Drizzle Kit can generate SQL migration files or apply schema changes directly to the database. The README also mentions Drizzle Studio, a tool for browsing and manipulating data. The exact commands are not in the README, so you would need the docs for a precise invocation.
Limitations and Failure Modes
Drizzle's headless approach has real costs. Because it stays close to SQL, you lose the convenience of automatic relationship loading and identity mapping that full ORMs like Prisma provide. You write joins explicitly or use the relational query builder, but you still think in tables and foreign keys. Another limitation is the maturity of the project. The latest release is v1.0.0-rc.5, dated 2026-10-21. A release candidate means the API may still change before a stable 1.0. If you adopt it now, you should expect breaking changes between release candidates. The README claims support for every PostgreSQL, MySQL, and SQLite database, including serverless ones. That is a broad claim, and the actual support depends on the driver. The README links to the documentation for each listed integration but does not say which features are tested for each. A user who relies on an exotic driver might find gaps. Finally, the zero-dependency claim applies to the core library, but Drizzle Kit and Drizzle Studio are separate tools so the README's zero-dependency claim should not be assumed to cover them.
Alternative: Prisma and Its Different Approach
The most obvious alternative is Prisma. Prisma uses a schema file written in its own DSL, then generates a client. That client is a full object mapper with automatic relation loading, transactions, and a query engine that runs as a Rust binary. This is a fundamental difference. Prisma hides SQL generation behind a high-level API, while Drizzle exposes a query builder that mirrors SQL. Prisma also has a heavier runtime and a code generation step, which can complicate serverless deployments. Drizzle avoids the Rust binary and the generation step by using TypeScript types directly. The trade-off is that Prisma gives you a more opinionated workflow and a stable query API, while Drizzle gives you control and a smaller footprint. If you want an ORM that feels like a framework, Prisma is the choice. If you want a typed layer over SQL that does not get in the way, Drizzle is built for that. The difference is not just syntax; it is the entire philosophy of how much abstraction you want between your code and the database.
Maintenance and Upgrade Cost
The repository is actively maintained, with the last push on 2026-11-02 and the latest release v1.0.0-rc.5 dated 2026-10-21. That points to ongoing development, but also a moving target. The upgrade cost depends on the changes between release candidates. Without a stable 1.0, you cannot assume semantic versioning guarantees. The license is Apache-2.0, which is permissive for commercial use, but you should read the license text yourself for specific obligations. The project has no archived status, so maintenance appears ongoing. The absence of dependencies in the core library means fewer supply chain risks, but the companion tools are separate and may have their own dependencies. If you use Drizzle Kit for migrations, you need to keep it in sync with the ORM version. The repository has a changelogs directory to check for specifics. Overall, the maintenance cost is moderate if you stay on a release candidate and track changes, but it could be high if you need a stable API.
Editorial conclusion
Adopt Drizzle ORM if you work in TypeScript across Node, Bun, Deno, or edge runtimes, need a small bundle, and prefer writing SQL-like queries over magic. Skip it if you want an ORM that hides SQL behind a high-level API or if you rely on a mature, stable 1.0 release, since the project is still in release candidates as of the v1.0.0-rc.5 release in October 2026. Before adopting, verify that your specific database driver and runtime combination appears in the documentation, and check the migration workflow with Drizzle Kit on a small schema first.
Frequently asked questions
What is Drizzle ORM for?
Drizzle is a TypeScript ORM for PostgreSQL, MySQL and SQLite, described as a headless library for NodeJS, TypeScript and JavaScript. It lets you declare SQL schemas and build both relational and SQL-shaped queries, and it ships a command line companion for migrations plus a studio tool for browsing and manipulating data.
Is Drizzle an ORM or query builder?
The project positions itself as a modern TypeScript ORM that remains a thin typed layer on top of SQL. It presents both capabilities together: you declare SQL schemas and then build either relational queries or SQL-like ones, keeping a balance between type safety and extensibility.
what is drizzle orm vs prisma
The project makes no comparison with Prisma or any other ORM. What it states about itself is a lightweight, tree shakeable package of roughly 7.4 kilobytes minified and gzipped with zero dependencies, supporting PostgreSQL, MySQL and SQLite including serverless offerings, across runtimes from Node and Bun to Cloudflare Workers and browsers.
how to install drizzle orm
The front page carries no install command and links to the documentation site instead, where the getting started material lives. Note that the core ORM package is installed separately from the command line migration companion and from the schema validation integrations, which ship as their own packages on separate version lines.
how to use drizzle orm
You declare your SQL schema, then write queries against it using either the relational interface or the SQL-shaped one. Around that core, the ecosystem provides a CLI companion that generates SQL migration files or applies changes directly to the database, a studio for browsing data, a seeding package, and adapters connecting your schemas to external validation libraries.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/drizzle-team-drizzle-orm)Star history chart for your README
[](https://hysenlabs.com/projects/drizzle-team-drizzle-orm)Was this useful?