← Back to Glossary Drizzle ORM logo

Drizzle ORM

ORM

Drizzle is the ORM for developers who actually like SQL but want type safety. Unlike Prisma, which abstracts SQL away behind its own query API, Drizzle lets you write queries that look and feel like SQL but with full TypeScript types. The result is an ORM that produces predictable, efficient queries without the magic. I reach for Drizzle on projects where I need precise control over the SQL being generated, edge deployments where every kilobyte of bundle size matters, or projects with complex queries where I want to see exactly what is hitting the database. Its zero-dependency philosophy and tiny footprint make it ideal for serverless and edge computing.

The Origin Story

Drizzle came out of the frustration that many TypeScript developers felt in 2022. Prisma had won the ORM popularity contest, but a vocal segment of the community had complaints: the Rust-based query engine added megabytes to the deployment bundle, the generated SQL was sometimes surprising, and running Prisma on edge runtimes like Cloudflare Workers was either impossible or required workarounds. Alex Blokh and the Drizzle team started building an alternative that took the opposite approach to almost every design decision Prisma had made. No code generation step. No external engine. No separate schema language. Instead, you define your schema in TypeScript, and the ORM is a thin, type-safe layer that translates your TypeScript expressions into SQL. The first stable release gained traction quickly on Twitter and GitHub through word-of-mouth from developers who were tired of fighting their tools. By mid-2023, Drizzle had amassed over 15,000 GitHub stars and was being adopted by companies building on Cloudflare Workers, Vercel Edge Functions, and other serverless platforms where Prisma's binary engine was a non-starter. The project's tagline, "If you know SQL, you know Drizzle", captured exactly why developers were switching.

Why Developers Love It

The SQL-like query builder is the headline feature. When you write a Drizzle query, it maps almost one-to-one with the SQL that gets executed. A select with a where clause, a join, a group by, the Drizzle code mirrors the SQL structure so closely that a developer who knows SQL can read and write Drizzle queries without consulting documentation. This predictability matters because it means you can reason about query performance just by reading the application code. There is no hidden query engine making decisions you did not ask for. The other thing developers love is the bundle size. Drizzle's core package is under 50 kilobytes. Compare that to Prisma's engine binary which can be 10 megabytes or more. On Cloudflare Workers, where the bundle limit is 1 megabyte for the free tier, that difference is not academic, it is the difference between your ORM working or not. For my client projects that deploy to edge runtimes, Drizzle is often the only viable choice. It pairs perfectly with Neon's serverless Postgres driver and Turso's libSQL client, both of which are designed for the same edge-first architecture.

orm.drizzle.team

Looking for a lightweight, SQL-first ORM in your project?

or hi@mikelatimer.ai