Stack Picker
a developer-grade decision engine
Back to the picker
ORM / Query Layer

Drizzle

Lightweight TS-first ORM / query builder — SQL-shaped API.

Official site
Monthly cost
Free
Popularity
4/5
LLM knowledge
4/5
Difficulty
Medium
#edge#typescript#open-source

What Drizzle is good at

Strengths
  • +Tiny bundle
  • +Edge-compatible
  • +SQL-like API
Tradeoffs
  • Younger than Prisma
  • Migrations less polished

Coding-agent prompt

You're using Drizzle ORM. Follow these rules:

- Schema as code in `schema.ts`; each table is a `pgTable(...)` / `mysqlTable(...)` export.
- Query with the typed builder — it reads like SQL because it *is* SQL.
- Use `drizzle-kit generate` to produce migrations; `drizzle-kit push` only for prototyping.
- Relations declared explicitly with `relations(...)` — no magic inference.
- Prefer `db.query.users.findMany({ with: { posts: true } })` for nested reads over manual joins.
- Stick to transactions (`db.transaction`) for anything multi-statement.

Beginner's guide to Drizzle

In one line: A lightweight, TypeScript-first alternative to Prisma with a SQL-like feel.

Drizzle is an ORM / query builder. Unlike Prisma, its queries read almost like SQL, which some people prefer. It's small and works well on edge runtimes like Cloudflare Workers.

Try it in your terminal
  • npm install drizzle-orm && npm install -D drizzle-kit

    Install Drizzle and its tooling.

Popular pairings with Drizzle

Browse all categories