DEV Community

Alex Spinov
Alex Spinov

Posted on

Drizzle ORM Has a Free TypeScript ORM — SQL That Feels Like TypeScript

Drizzle ORM is a TypeScript-first ORM that gives you type-safe SQL without the magic.

What You Get for Free

  • Type-safe queries — full TypeScript inference on every query
  • SQL-like syntax — if you know SQL, you know Drizzle
  • Zero dependencies — lightweight, no heavy runtime
  • Multiple databases — PostgreSQL, MySQL, SQLite, Turso
  • Drizzle Kit — auto-generate migrations from your schema
  • Drizzle Studio — built-in database browser UI
  • Edge-ready — works on Cloudflare Workers, Vercel Edge
  • Relational queries — nested includes without N+1

Quick Start

npm install drizzle-orm postgres
npm install -D drizzle-kit
Enter fullscreen mode Exit fullscreen mode
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'),
})

// Query — looks like SQL, types like TypeScript
const result = await db.select().from(users).where(eq(users.age, 25))
// result is typed as { id: number, name: string, age: number | null }[]
Enter fullscreen mode Exit fullscreen mode

Why Developers Switch from Prisma

Prisma generates a heavy client and has its own query language:

  • No code generation — schema IS the type, no prisma generate
  • SQL-likeselect().from().where() not findMany({ where: {} })
  • Lighter — 0 dependencies vs Prisma's 15MB engine
  • Edge-compatible — works everywhere, no binary needed

A Next.js app had 3-second cold starts on Vercel due to Prisma's binary engine. After switching to Drizzle: 200ms cold starts, same queries, same database.

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)