Picking an ORM is Getting Harder...

preview_player
Показать описание
Prisma is one of, if not maybe my favorite technologies out there. But over time I have been gravitating to drizzle more, and more, and more, however there are some compelling things coming in the Prisma world that are gonna make it more compelling than EVER, very, very, soon.

PRISMA ARTICLES LINKS

my stuff

#serverless #typescript #database
Рекомендации по теме
Комментарии
Автор

TWO THINGS: first, the SvelteKit deep dive is almost done, currently I am just struggling with trying to figure out how to explain/frame/handle the different file types (page.svelte, layout.svelte, server.ts, page.ts, page.server.ts, etc). Its tricky, and I really want this one to be done correctly. Second, the AC is out and its 95 degrees here so sorry about the tank top (sort of 😈)

bmdavis
Автор

I had no idea about this new direction of prisma and I use it lol thanks ❤ love your content keep it up man

Mindflays_
Автор

Big fan, keep up the solid content 🎉❤

zkoolkyle
Автор

Drizzle just seemed like the safer choice right now. Building a single very large app so unfortunately had to make that decision pretty early and it will affect things for a very long time

WyzrdCat
Автор

my company use oracle, so yeah only sequelize for now

even some function are write in raw sql, since it's a very complex query

boniedwin
Автор

Where'd you find info about supabase's concurrent connections?

I'm also curious about planetscale's lack of foreign key constraints. I'm pretty new to DBs so i don't know much about the long-term effects, so maybe you can also make a vid on this? (And maybe other things about supabase vs planetscale as well)

mmzzzmeemee
Автор

We at my work are against ORM frameworks as the experience had proved in production environments with hundreds of customers and transactions per secs we had to deal with big performance issues. The syntaxes and easy code of a framework has the reverse side of the coin with a black box that generates SQL queries to your DB that aren't optimized for the tasks you're using. We saw on DB logs ORM generates SQL queries with hundreds of unnecessary fields, joins, and transformations for tasks that you paid with slow DB responses. And this kind of issues only are raised in production environments or with real workload tests. So, a word of caution every time you use a ORM take a look the generated SQL and profile the performance of your system with real scenarios.

MrSparc
Автор

drizzle honestly seems like a clone of laravel orm. It's not bad, but prisma is miles better and the syntax is much easier to reason with imo. Either sql or just make it more like object (typescript). I hate the in-between with really no benefit aside from making you locked down to using their orm.

lazyhrse
Автор

Hi Ben, are a lot of companies using these newer types of databases like Prisma? I just started backend development earlier this year and I am using the basic traditional SQLite3, MySQL and I was curious is it worth learning these newer types of databases for landing a job? Thanks!

DevlogBill
Автор

I really wanted to use drizzle, the query sintax is really great and nothing comes close to it's prepared statements.

But the table definition schema sucks, that's the only thing keeping me from using it.
My current setup uses Prisma for schema definition, migrations and prisma studio, but with kysely instead of prisma/client, so no prisma binaries on production builds.

There's generators for transforming prisma schemas into kysely interfaces, which work great in CI steps.
Drizzle just hasn't a generator, and my team is already familiar with the prisma schema sintax.
I do prefer drizzle over kysely, but the dev experience of prisma makes it not worth it.
I wish I could integrate drizzle with prisma like I did with kysely.

Kysely is mostly fine, the sintax is very close drizzle's query builder and knex, but I miss ORM-level mapping and decent prepared statements.

tomorrowlimit
Автор

Are ORMs vulnerable to SQL injections?

pdicpdz
Автор

orm is the issuse in the first place. its not really needed 😂

savire.ergheiz
Автор

Surprised you didn't mention TypeORM nor Sequelize, any thoughts on those two?

au
Автор

I still think JS on the backend is a mistake.

Katsunam
Автор

Ben, im sorry. Why don't you JUST WRITE SQL??, here's what my take and the problems am trying to avoid, ORMs dont really teach you SQL which if you are a beginner, you'll have a very roigh time with databases of any kind, 2ndly most of the industry uses JUST SQL because ORMs become very limiting when you start doing complex queries e.g drizzles many-to-many relations syntax is just pure garbage!, 3rd there is a very high chance that you are writing SQL for complex queries already, why dont you just go with SQL??

abdirahmann
Автор

why the hell do we even need ORMs? Why are you talking about it like you fell in love with it? Just write SQL?

nxprxtp
Автор

Prisma is not. Open source it's a paid tool

nested