Is Drizzle Really Better Than Prisma?

preview_player
Показать описание
Prisma has been one of the most popular TypeScript first database ORMs for the last few years, but recently Drizzle has grown in popularity due to its customization, speed, and ease of use. In this video I will compare everything about Prisma and Drizzle so you will know once and for all which database ORM is best for your project.

📚 Materials/References:

Drizzle Crash Course Video: Coming Soon

🌎 Find Me Here:

⏱️ Timestamps:

00:00 - Introduction
00:39 - What Are Drizzle/Prisma
01:08 - What Database They Work With
02:03 - Studio App
02:33 - CLI
03:15 - Setup Steps
05:51 - Schema Definitions
08:32 - CRUD Operations
13:25 - Type Safety
14:14 - Performance
16:39 - Documentation
17:44 - Conclusion

#DrizzleVsPrisma #WDS #TypeScriptORM
Рекомендации по теме
Комментарии
Автор

Drizzle is pretty great. I spent so much time fighting with prisma do get it to do what I wanted. Although I did have to write a library worth of custom types for drizzle, i was able to get it working

realbigsquid
Автор

Waiting for a new Prizzle ORM after a few weeks 🥴

gavrshchuk
Автор

Kysely as query builder, and Prisma for studio/schemas/migrations ✅

zivtamary
Автор

The code for product discounts at 10:22 is an N+1 query which is bad. Drizzle’s lack of magic makes it more clear what’s going on behind the scenes

jeduan
Автор

ORMs like Prisma etc. generate large files when you have 100s of relational tables. Specially when you use extra plugins for validations and such, it quickly starts to unravel. Best for smaller apps with less than 30 tables. The amount of code / metadata generated by Prisma and other plugins is humungous.

Leo-tfgu
Автор

Thank you for your thorough research. I needed the expert's opinion about those two.

acolyte
Автор

Drizzle is the first ORM I've used. I like that it uses TypeScript instead of Prisma's own solution, and that it's closer to SQL. However, I believe it's not mature enough yet to implement it in a big project in a productive way. I spent a couple of days setting up Drizzle with NextAuth, only to find out that the Drizzle Adapter doesn't implement some features Prisma offers out of the box, which would have saved me lots of time.

lapppius
Автор

I've fought so much with Prisma to get performance in cases of join. Ended up writing my own statement cuz Prisma does join very inefficiently with on and stuff. Hope this solves it!

mikr
Автор

The insert method of Drizzle ORM also accepts arrays, allowing you to insert multiple discounts...

emman
Автор

Looking forward to the drizzle crash course!

the_yugandharr
Автор

Kyle, do you know if Drizzle also has performance gains for row reading? From what I know Prisma reads all rows from a given table, then filters the request data in its Rust binaries. It can be costly.

Does Drizzle only read the rows specified in a given query?

ThiagoVieira
Автор

I really wanted to like Prisma, but I couldn’t get its rust-powered tooling build/migrate on a remote CI/CD pipeline in conjunction with Turborepo. Drizzle is a happy medium and has the big benefit of just being a JavaScript library.

reedlaww
Автор

Finally someone showed what a DX nightmare Drizzle is, especially when it comes to relations. It is a deal breaker to me.

Jacek
Автор

so far only thing that feels strange in drizzle is pgTable and other such staff like if i want to change database i would have to siginifically change my code.

Nextdesu
Автор

I'm liking Kysely + Prisma. Although you can argue that it's a lot of overhead

congminhluu
Автор

I've seen my guys videos for a while now and i just noticed how much he wobbles his head left and right constantly, now i cannot stop seeing it

NachoNoCodea
Автор

I don’t have much experience with node backends(the only project I’ve worked on used kysely), I haven’t used drizzle nor prisma, but looking at your examples I see why people might want to use prisma and why I already hate it. Drizzle seems to be much more like an actual query builder as opposed to prisma which tries to abstract away everything. Having worked with such solutions in other languages it was always great until the abstractions broke in unexpected ways, like hibernate generating a few hounded joins where two would suffice

matrix
Автор

A good example of Imperative vs Declarative syntax.

mac.ignacio
Автор

I use Kysely. It's the best. And prisma for schema and migrations.

radimhof
Автор

While I knew just about all of this already, it's great to see your examples and explanation for people that didn't and are just trying to pick their ORM. Great video!

DomskiPlays