Drizzle ORM is a lightweight TypeScript ORM that feels like writing SQL with full type safety.
What You Get for Free
- SQL-like syntax — queries look like SQL, not method chains
- Full type safety — inferred types from schema, zero runtime overhead
- Zero dependencies — no heavy runtime, minimal bundle size
- PostgreSQL, MySQL, SQLite — all major databases
- Drizzle Kit — migrations, push, pull, studio
- Drizzle Studio — visual database browser
- Relations — declarative relations with type-safe joins
- Serverless-ready — works with Neon, PlanetScale, Turso, D1
Quick Start
npm install drizzle-orm postgres
npm install -D drizzle-kit
import { pgTable, serial, text, integer } from 'drizzle-orm/pg-core';
import { drizzle } from 'drizzle-orm/postgres-js';
const users = pgTable('users', {
id: serial('id').primaryKey(),
name: text('name').notNull(),
age: integer('age'),
});
const db = drizzle(connectionString);
// SQL-like, fully typed
const result = await db.select().from(users).where(eq(users.age, 25));
// result is typed as { id: number, name: string, age: number | null }[]
Why Developers Choose It Over Prisma
Prisma generates a heavy client. TypeORM has poor TypeScript support:
- No code generation — types inferred from schema definition
- Tiny bundle — no 2MB Prisma Engine
- SQL-like — if you know SQL, you know Drizzle
- Serverless — no binary engine, works everywhere
A Next.js developer was fighting Prisma's 2MB client bundle and cold start times on Vercel Edge. They switched to Drizzle — bundle dropped by 95%, cold starts improved by 3x, and they can write SQL-like queries with full TypeScript inference.
Need Custom Data Solutions?
I build production-grade scrapers and data pipelines for startups, agencies, and research teams.
Browse 88+ ready-made scrapers on Apify → — Reddit, HN, LinkedIn, Google, Amazon, and more.
Custom project? Email me: spinov001@gmail.com — fast turnaround, fair pricing.
Top comments (0)