Drizzle ORM is a TypeScript ORM that takes a different approach from its rivals: instead of hiding SQL behind magic, it gives you a type-safe way to write SQL that still looks like SQL. You write queries that read like the SQL you already know, and TypeScript checks every column, every table, and every result. If you like SQL but hate string-based queries, Drizzle is the tool for that.
The idea is simple. You define your tables as TypeScript objects. You write queries with a builder that mirrors SQL — select, from, where, orderBy. The result is fully typed, so your editor autocompletes column names and catches typos before you run anything.
import { pgTable, serial, text, integer } from "drizzle-orm/pg-core"; import { db } from "./db"; import { eq } from "drizzle-orm"; export const users = pgTable("users", { id: serial("id").primaryKey(), name: text("name").notNull(), email: text("email").notNull().unique(), age: integer("age"), }); // Insert a user await db.insert(users).values({ name: "Arhan", email: "arhan@example.com", age: 22 }); // Query with full type safety const adults = await db .select() .from(users) .where(eq(users.age, 22)); console.log(adults[0].name); // TypeScript knows this is a string Getting started is simple. Install drizzle-orm and the driver for your database — Postgres, MySQL, or SQLite — define one table, and run your first query. The docs have a quickstart for each database, and Drizzle Kit handles migrations with a single command.
Drizzle ORM is for TypeScript developers who like SQL, beginners who want to learn databases without an ORM hiding everything, and teams who want type safety without the weight of a heavy ORM. It is especially good for serverless and edge projects, where its tiny size and zero dependencies matter.
The limits are honest. Drizzle is younger than Prisma, so its ecosystem of tools and examples is smaller. It expects you to know basic SQL — if you want an ORM that hides the database completely, Prisma may feel easier. And some advanced features, like complex relations, need more manual work.
Start today with one thing: define one table and write one insert and one select query. Open the generated SQL in your terminal and read it — you will understand every line. In a week you will have a fully typed database layer, and you will actually enjoy writing queries.


