Drizzle ORM gives you type-safe database queries that look like SQL. Zero runtime overhead, zero code generation.
The ORM Problem
Prisma: great DX, but requires code generation, has a query engine binary, and the query syntax looks nothing like SQL.
TypeORM: decorator-heavy, inconsistent types, maintenance concerns.
Drizzle: your queries ARE SQL — just with TypeScript types.
What You Get for Free
SQL-like query builder:
const users = await db
.select()
.from(usersTable)
.where(eq(usersTable.age, 25))
.leftJoin(postsTable, eq(usersTable.id, postsTable.authorId));
If you know SQL, you know Drizzle.
Zero code generation — no prisma generate, no build step
Zero runtime dependencies — Drizzle is a thin TypeScript layer
All major databases: PostgreSQL, MySQL, SQLite, Turso, Neon, PlanetScale
Drizzle Kit — migrations, introspection, studio (database browser)
Quick Start
npm i drizzle-orm postgres
npm i -D drizzle-kit
Define your schema:
import { pgTable, serial, text, integer } from 'drizzle-orm/pg-core';
export const users = pgTable('users', {
id: serial('id').primaryKey(),
name: text('name').notNull(),
age: integer('age'),
});
Generate and run migration:
npx drizzle-kit generate
npx drizzle-kit migrate
Why Developers Are Switching
-
No black box — you see exactly what SQL runs.
db.select()...maps 1:1 to SQL - Serverless-friendly — no connection pooling binary, no cold start penalty
- Type inference — query results are fully typed based on your schema
- Relational queries — Drizzle also has a Prisma-like relational API if you prefer:
const result = await db.query.users.findMany({
with: { posts: true },
where: eq(users.age, 25),
});
Drizzle Studio
npx drizzle-kit studio
Opens a local web UI to browse your database, run queries, and edit data. Free, no account required.
If you think in SQL but want TypeScript safety — Drizzle is exactly what you've been looking for.
Need web scraping or data extraction? Check out my tools on Apify — get structured data from any website in minutes.
Custom solution? Email spinov001@gmail.com — quote in 2 hours.
Top comments (0)