---
title: "ORMs vs. Query Builders for your Typescript application"
description: "Drizzle, Kysely, Prisma and Zapatos are compared as type-safe Postgres libraries for TypeScript across schema definition, query syntax, raw SQL support, migrations, edge-runtime support and community size."
url: "https://swe.quest/articles/orms-vs-query-builders-for-your-typescript-application-9783c98c487b60f6"
canonical: "https://neon.com/blog/orms-vs-query-builders-for-your-typescript-application"
source: "Neon"
published: "2023-05-16"
difficulty: "medium"
kind: "Opinion"
reading_minutes: 9
tags: ["typescript","postgres","schema-migrations","developer-tools","sql"]
---

# ORMs vs. Query Builders for your Typescript application

A post on [Neon](https://swe.quest/sources/neon.md), published 2023-05-16, 9 min read, Opinion. Original: [https://neon.com/blog/orms-vs-query-builders-for-your-typescript-application](https://neon.com/blog/orms-vs-query-builders-for-your-typescript-application)

## Summary

Drizzle, Kysely, Prisma and Zapatos are compared as type-safe Postgres libraries for TypeScript across schema definition, query syntax, raw SQL support, migrations, edge-runtime support and community size. Drizzle offers SQL-like syntax with drizzle-kit migration generation, Kysely favors WYSIWYG TypeScript-centric queries with hand-written up/down migrations, Zapatos generates types from the database but has no migrations, and Prisma uses its own schema language with Prisma Migrate. Performance differences were negligible in a small test (averages within 3ms). Prisma has by far the largest community, while the other three can run on edge runtimes via serverless Postgres drivers, which Prisma could not at the time.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [TypeScript](https://swe.quest/tags/typescript.md) (Languages)
- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)
- [Schema migrations](https://swe.quest/tags/schema-migrations.md) (Data & databases)
- [Developer tools](https://swe.quest/tags/developer-tools.md) (Engineering practices)
- [SQL](https://swe.quest/tags/sql.md) (Languages)

## Prerequisites

- TypeScript basics ([easy posts on TypeScript](https://swe.quest/tags/typescript.md?difficulty=easy))
- SQL fundamentals ([easy posts on SQL](https://swe.quest/tags/sql.md?difficulty=easy))
- database migrations ([easy posts on Databases](https://swe.quest/tags/databases.md?difficulty=easy))

## Keywords

Drizzle, Kysely, Prisma, Zapatos, drizzle-kit, Prisma Migrate, Neon

## Related posts

- [Build a Database App with Drizzle ORM and Deno](https://swe.quest/articles/build-a-database-app-with-drizzle-orm-and-deno-692f9df52f193839.md): Deno · 2024-11-13 · Medium · 7 min read · TypeScript, PostgreSQL, JavaScript, Schema migrations
  Drizzle ORM can be used from Deno via npm compatibility to get type-safe CRUD access to PostgreSQL.
- [When to choose an ORM for your Database](https://swe.quest/articles/when-to-choose-an-orm-for-your-database-81a466157e5ffa81.md): Turso · 2023-12-06 · Easy · 6 min read · Databases, SQL, TypeScript
  ORMs, query builders and raw SQL each fit different situations, and many projects do best mixing them.
- [Better Postgres with Prisma Experience](https://swe.quest/articles/better-postgres-with-prisma-experience-595f740758817ccf.md): Neon · 2024-03-07 · Medium · 4 min read · PostgreSQL, Schema migrations, Serverless, TypeScript
  Prisma users on Neon can now use a single pooled Postgres connection string for both serverless queries and schema migrations, replacing separate pooled, direct and shadow database URLs.
- [@neondatabase/serverless hits 1.0.0](https://swe.quest/articles/neondatabase-serverless-hits-1-0-0-d5430675bc92b751.md): Neon · 2025-03-25 · Medium · 5 min read · PostgreSQL, Serverless, TypeScript, Application security, JavaScript
  Neon's JavaScript/TypeScript serverless driver, which carries Postgres queries over HTTP and WebSockets for environments without raw TCP such as V8 isolates and browsers, reaches 1.0.0 after a refactor that adds auto-generated types via api-extractor and CI tests across Node, Bun, Deno, browsers, Cloudflare Workers, Vercel and the Prisma/Drizzle adapters.
- [Build a serverless API using Cloudflare Workers, Drizzle ORM, and Neon](https://swe.quest/articles/build-a-serverless-api-using-cloudflare-workers-drizzle-orm-and-neon-f83c472c9d399a17.md): Neon · 2023-05-30 · Medium · 9 min read · Serverless, PostgreSQL, TypeScript, Schema migrations
  A step-by-step setup for a serverless TypeScript API on Cloudflare Workers that uses Hono for routing, Drizzle ORM for schema definition and migrations, and Neon serverless Postgres for storage.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
