Database Access & ORMs for Next.js: what 34 makers' products chose
Among 34 makers' products built with Next.js that we know the database access & ORMs of, Prisma leads: 24 of them (71%). Next come Drizzle ORM (10).
Schema-first ORM, SQL-shaped query builder, or the platform's own SDK. A schema-first ORM generates types and migrations from one schema file and hides the SQL; a SQL-shaped ORM or query builder keeps queries close to SQL with full types and a smaller runtime; a backend platform (Supabase, Convex, Firebase) comes with its own client, and adding an ORM on top is often unnecessary.
What makers on Next.js chose
| Option | Next.js products | All makers |
|---|---|---|
| 24 (71%) | 74% | |
| 10 (29%) | 24% |
Live makers' products with a source for both: that they're built with Next.js, and what they use for database access & ORMs. A product using two options counts in both; not market share. "All makers" is the option's share among every maker's product that made this decision.
Which to pick, by situation
- You want one schema file that generates types, migrations and a readable query API
Prisma 24 here - You deploy to serverless or edge functions and want queries that read like SQL, fully typed
Drizzle ORM 10 here
Prisma
Schema-first ORM24 Next.js products here (71%).
llms.txtMCPCLIBest forA schema-first ORM with generated types and migrations.
Trade-offA generated client and its own schema language sit between you and SQL; complex queries often drop back to raw SQL.
“Since a year I build all my products with Prisma. It is a huge time saver and I like having the overview in one single file. It's migration just works all the time. Thanks Prisma!”
- Types generated from the schema make queries type-safe, catching data bugs at compile time instead of in production. 3 sources
- One readable schema file drives migrations that are predictable and rarely break production. 3 sources
- Generated queries can be unexpectedly heavy, causing database spikes and connection latency under concurrent load. 2 sources
- Postgres extensions like pgvector are poorly supported. 1 source
“Skipping on ORMs is peak boomer behavior. It's usually between Drizzle and Prisma, I personally prefer Drizzle but wanted to give Prisma another shot for this project. Prisma has a lot of stuff going for it (e.g. prisma schema files are way cleaner and easier to parse than drizzle's) It sucked for PGVector and doesn't do well with Postgres extensions in general tho, would love if the guys over at Prisma could improve that.”
Database Access & ORMsMaker says so · source ↗“Makes writing type-safe SQL code a joy”
Database Access & ORMsMaker says so +1 · source ↗“My ORM of choice, a breeze to work with.”
Database Access & ORMsMaker says so · source ↗“Type-safe ORM. Migrations that don't break prod.”
Database Access & ORMsMaker says so · source ↗“My favourite ORM, by far. Prisma helped me have complete control over an area I wasn't really keen on, databases.”
Database Access & ORMsMaker says so · source ↗“I did NOT want to use this at the start... but it admittedly was worth the initial bit of learning. Prisma paired with NoSQL like mongoDB was a gamechanger and has saved countless hours when setting up the backend database tables and managing relationships. I honestly love using prims now.”
Database Access & ORMsMaker says so · source ↗“Since a year I build all my products with Prisma. It is a huge time saver and I like having the overview in one single file. It's migration just works all the time. Thanks Prisma!”
Database Access & ORMsMaker says so · source ↗“Accelerated database development with TypeScript.”
Database Access & ORMsMaker says so · source ↗“we are using prisma both for our core cal.com repository but also for our platform starter kit”
Database Access & ORMsMaker says so +1 · source ↗“When building a relational tool for bookings and contracts, the schema is everything. Prisma makes managing that schema—and migrations—predictable and safe. Tip: Use Prisma Studio locally during beta testing. It’s the fastest way to verify data states without writing SQL queries. Alternatives: Drizzle is catching up, but Prisma’s DX for managing complex relations is still the standard for me.”
Database Access & ORMsMaker says so · source ↗
Drizzle ORM
SQL-shaped ORM10 Next.js products here (29%).
llms.txtCLIBest forA thin, SQL-like TypeScript ORM that runs well on serverless and edge runtimes.
Trade-offCloser to SQL means you need to know SQL, and there are fewer guides and integrations than for Prisma.
“Drizzle ORM challenges MongoDB's schema-less claim. Schemas are beneficial, provided there's an effective solution for schema delta generation and migration scripts. Drizzle ORM did it.”
- It is lightweight and type-safe, and feels straightforward next to bulkier TypeScript ORMs. 2 sources
- drizzle-kit push speeds prototyping, migrations deploy cleanly, and there is no generated client package to rebuild. 2 sources
- Database features like SQLite STRICT tables and deferrable Postgres constraints stay unsupported for years, pushing some projects off it. 3 sources
- Its own operator-style query syntax limits what you can express compared with writing SQL, such as full-text search. 2 sources
“Drizzle allows us to easily manage database migrations and access data in type safe manner. Even our "raw sql only" guy likes it!”
Database Access & ORMsMaker says so · source ↗“The best and most dev friendly ORM we've used. We actually started on prisma, but their `migrate dev` functionality started to take minutes per deployment. Drizzle helps you avoid it, and locally their `push` functionality is great for rapid prototyping, and their `migrate` and `deploy` function works flawlessly. Also it does not require generating a local package, just an amazing developer experience. I hope to donate when the company gets a bit more revenue hehe.”
Database Access & ORMsMaker says so · source ↗“Drizzle kit push is amazing. no need for migrations”
Database Access & ORMsMaker says so · source ↗“Drizzle ORM challenges MongoDB's schema-less claim. Schemas are beneficial, provided there's an effective solution for schema delta generation and migration scripts. Drizzle ORM did it.”
Database Access & ORMsMaker says so · source ↗“Drizzle ORM makes database interactions easy.”
Database Access & ORMsMaker says so · source ↗“Drizzle ORM has been a game-changer for Dokploy. As a developer focused on efficient and reliable data handling, Drizzle's seamless integration into my workflow.”
Database Access & ORMsMaker says so +1 · source ↗“Drizzle ORM is amazing. It allows building database queries effortless. Is lightning fast and should be used by every Type Safety projects.”
Database Access & ORMsMaker says so · source ↗“I prefer Drizzle ORM because it’s lightweight and focuses on type safety with TypeScript. It’s a lot easier to use than bulkier ORMs, and it gives me confidence that I won’t run into unexpected runtime errors.”
Database Access & ORMsMaker says so · source ↗“Huge shoutout to DrizzleORM, made it easier to work with complex queries.”
Database Access & ORMsMaker says so · source ↗Also chosen, and not seen yet
Real options for database access & ORMs not seen among these Next.js products yet: Kysely, SQLAlchemy.
Who switches, and to what
Public GitHub pull requests whose title says "X to Y", by developers in general, not only on Next.js.
- Prisma → Drizzle ORM 140 pull requests · how they moved
- Drizzle ORM → Prisma 27 pull requests
Getting database access & ORMs right
Keep every schema change in migrations checked into the repo, and run them in CI or on deploy — never by hand in production. If you're on a backend platform, start with its client and add an ORM only when you outgrow it.
- Editing tables in the production console instead of writing a migration, so the next deploy's migration fails or silently drops the change.
- Loading related rows one query at a time in a loop, which feels fine on ten rows and times out on a thousand.
- Adding an ORM on top of a backend platform's client out of habit, then fighting two sources of truth for types and access rules.
The rest of the Next.js stack
What makers' Next.js products chose for their other decisions, the most common pick for each:
- Hosting: Vercel 1,078 of 1,312
- Transactional Email: Resend 493 of 830
- Database: Supabase 171 of 382
- Payments: Stripe 288 of 359
- LLM API: OpenAI API 222 of 301
- Authentication: Clerk 176 of 211
- Web Analytics: Google Analytics 105 of 197
- Product Analytics: PostHog 123 of 168
Questions
What do most Next.js apps use for database access & ORMs?
Among 34 makers' products built with Next.js that we know the database access & ORMs of, Prisma leads: 24 of them (71%). Next come Drizzle ORM (10).
How this is counted: a product is on Next.js when a live-product source says so (the maker, its website, a customer story or a subprocessor list), and the same for its database access & ORMs. How evidence is collected.