And the "required inverse relationships" in complex enterprize - level entities - don't bother you at all )) ? ... I bet you that while you are reading this comment - this is still a major issue in the "more mature Prisma" ... try a project with tens of interconnected entities and see how bloated your schemas will get with unecessairy relationships... and this issue was reported around version 2-3 ... now it''s version 5 - did they address it?
I had this yesterday. I’m going to switch back. This is not some edge case but can occur many times. Even with left joins the returned data does not resemble what I expect.
Do you mean having to explicitly handle junction tables? As the point of Drizzle is to be close to raw SQL but with type safety, that is not surprising IMO. Junction tables are a very fundamental concept of relational databases.
DrizzleORM looks cool but DrizzleORM has lack of features than Prisma has. and some part is more complex than Prisma.Prisma is much mature. The Next Prisma would be much faster than before. Even now, A JSON-based protocol improves Prisma’s performance since 5.0 ver. So you should think about Prisma 5 again. In the IT world, the dominance of users always wins in the end. This is why React/NextJS would be the ultimate winner in the web framework war. Others would be only for the hobbyists or only specific areas.
I tend to agree! I've been working on an large web app having a large number of polymorphic relationships. While Prisma doesn't handle these using the most efficient methods for Postgres, it manages to accomplish the task. Afraid to learn Drizzle only to discover that certain functions aren't possible. Maybe Drizzle may excel in some areas. I'd prefer to see more widespread acceptance in the industry before incorporating it into my projects. On the topic of query optimizations, I'm considering writing raw SQL queries wherever I find the need. This could provide a higher level of control and flexibility. Plus being future proof as Prisma is winning as of now.
so there is no room for innovation and new players? Every great tool has its time and every great tool has a "hobbyist" phase. Saying hobbyist is so cringe I know production apps making great money and serving there users with tools like drizzle. There is no ultimate winner lmao just use the tool that makes you the most productive and solves your problems. Its not a competition. I feel too often devs get defensive when someone isnt using the exact same tools as they are.
Hello Josh! I really love all your content revolving around Drizzle ORM! Do you have a video/walkthrough which utilizes Drizzle instead of Prisma, planned in the future? Keep up the great work 😊
I see DrizzleORM as a hobby like ORM. It is way easier for me to use its paradigm and the dx feels better. Even though it is currently faster and lighter than prisma, the prisma labs work really hard on improving this aspect, they have the whole team and big sponsor support. One good point is that DrizzleORM supports planetscale's serverless adapter
drizzle is getting truly amazing, hope it gets more attention/funding/help so that the creators or collaborators can continue working on it and fixing issues
in the case of foriegn key issues, i usually create views in planetscale for my purposes. so i can query from that view which basically some joins on tables with keys .
What is funny is that I just started using drizzle and I discovered this before you mate! :p maybe I should start my own youtube channel haha. Keep up the good work, btw I used both prisma and drizzle and raw queries with drizzle where I have to optimize. I generate the drizzle schema out of the generated database from prisma, and it's relationships... Then I can use drizzle or prisma wherever I want or both.
I have tried using drizzle two times now. The first time I had an issue that was preventing the creation of migrations, that got fixed eventually. And in the second time I found out it doesn't support pushing migrations with a postgres database. I think it still needs some maturing, but overall I was happy with the api and generating more efficient queries.
You can apply migrations with all database dialects from day 1. If you want to push(which has nothing with migrations), postgres push was released a few weeks ago
Is it possible to create completely new table programatically using Drizzle? Is it possible to change already existing table column without loosing your current column data?
You really should NEVER store images inside a database like postgress, mongodob, sqlite, etc. They just aren't meant for this, rather, use S3 or something similar to store images then save the link of the image in the database.
I had the same question. I start to think drizzle sponsored Josh or paid him to just say the beauty side of drizzle but didnt mention the overhead of creating schemas in drizzle
If the only winning factor for Drizzle over Prisma is performance, then it's a matter of time till Prisma catch-up. And Prisma actually did it.
And the "required inverse relationships" in complex enterprize - level entities - don't bother you at all )) ? ... I bet you that while you are reading this comment - this is still a major issue in the "more mature Prisma" ... try a project with tens of interconnected entities and see how bloated your schemas will get with unecessairy relationships... and this issue was reported around version 2-3 ... now it''s version 5 - did they address it?
@@DorinEsinenco20 lines of code to write a simple many-to-many relationship schema in drizzle. sure mate
@@jsvrs dude, who tf measures lines of code in 2024?)) Arent you using copilot? Took me abt 30 second to write an entire model+relaltions
@@DorinEsinenco my apologies, I realized I'm talking to a mediocre "developer"
the issue with drizzle is many to many relation the syntax is pure garbage
This is exactly why I haven’t made the switch
They will probably fix this too, they are just aiming to kill Prisma completely
For sure - fingers crossed. I think relations in general confuse me with Drizzle though, not just many to many.
I had this yesterday. I’m going to switch back. This is not some edge case but can occur many times. Even with left joins the returned data does not resemble what I expect.
Do you mean having to explicitly handle junction tables? As the point of Drizzle is to be close to raw SQL but with type safety, that is not surprising IMO. Junction tables are a very fundamental concept of relational databases.
DrizzleORM looks cool but DrizzleORM has lack of features than Prisma has. and some part is more complex than Prisma.Prisma is much mature. The Next Prisma would be much faster than before. Even now, A JSON-based protocol improves Prisma’s performance since 5.0 ver. So you should think about Prisma 5 again. In the IT world, the dominance of users always wins in the end. This is why React/NextJS would be the ultimate winner in the web framework war. Others would be only for the hobbyists or only specific areas.
+1
I tend to agree! I've been working on an large web app having a large number of polymorphic relationships. While Prisma doesn't handle these using the most efficient methods for Postgres, it manages to accomplish the task. Afraid to learn Drizzle only to discover that certain functions aren't possible. Maybe Drizzle may excel in some areas. I'd prefer to see more widespread acceptance in the industry before incorporating it into my projects.
On the topic of query optimizations, I'm considering writing raw SQL queries wherever I find the need. This could provide a higher
level of control and flexibility. Plus being future proof as Prisma is winning as of now.
most easy to use tool wins. sad bad true.
so there is no room for innovation and new players? Every great tool has its time and every great tool has a "hobbyist" phase. Saying hobbyist is so cringe I know production apps making great money and serving there users with tools like drizzle. There is no ultimate winner lmao just use the tool that makes you the most productive and solves your problems. Its not a competition. I feel too often devs get defensive when someone isnt using the exact same tools as they are.
@@nvcodes there is no competition? lols.
Hello Josh! I really love all your content revolving around Drizzle ORM! Do you have a video/walkthrough which utilizes Drizzle instead of Prisma, planned in the future? Keep up the great work 😊
I see DrizzleORM as a hobby like ORM. It is way easier for me to use its paradigm and the dx feels better. Even though it is currently faster and lighter than prisma, the prisma labs work really hard on improving this aspect, they have the whole team and big sponsor support. One good point is that DrizzleORM supports planetscale's serverless adapter
Great content as always. It would be awesome if you could do a video creating a complete application using Drizzle for the database
drizzle is getting truly amazing, hope it gets more attention/funding/help so that the creators or collaborators can continue working on it and fixing issues
in the case of foriegn key issues, i usually create views in planetscale for my purposes. so i can query from that view which basically some joins on tables with keys .
What is funny is that I just started using drizzle and I discovered this before you mate! :p maybe I should start my own youtube channel haha.
Keep up the good work, btw I used both prisma and drizzle and raw queries with drizzle where I have to optimize.
I generate the drizzle schema out of the generated database from prisma, and it's relationships...
Then I can use drizzle or prisma wherever I want or both.
So glad you showed this! Just happened to be writing a project in this stack ❤
Josh please make next js, drizzle and TypeScript crash course please, otherwise you're doing a great work ,thank you for everything
The only big problem with drizzle right now is the docs. It's bad and missing many parts.
I have tried using drizzle two times now.
The first time I had an issue that was preventing the creation of migrations, that got fixed eventually.
And in the second time I found out it doesn't support pushing migrations with a postgres database.
I think it still needs some maturing, but overall I was happy with the api and generating more efficient queries.
You can apply migrations with all database dialects from day 1. If you want to push(which has nothing with migrations), postgres push was released a few weeks ago
Fatastic. Im wating for the Dashboard Project. Lets Go
Can we already use drizzle with next-auth? i've been waiting for so long :(
I am, I literally copied and pasted an adapter I found on gh and works great
Josh please make next js and also typescript crash course
How can I setup drizzle with next-auth, There doesn’t seem to be an adapter yet?
Have you used server actions on production yet? I just started using them on a new project and its hard not to want to use them for everything 😂
It's becoming Django and that's good!
Is it possible to create completely new table programatically using Drizzle?
Is it possible to change already existing table column without loosing your current column data?
How to do transaction with drizzle? Seems like their example doesn't work
In Drizzle, I can't find how to seed data in MySQL, Postgres, etc.
one thing still not clear, like
if we do this way, where do we add the onDelete clauses ?
Prisma emulates this behaviour without foreign keys. IIRC drizzle has opinions on cascading deletes so they probably won’t add it
"if you were on twitter you could write 1000 tweets" not if the dude running the show has anything to say about it lmao
Prisma is beginner friendly and helps you avoid making mistakes. But drizzle runs on the edge, and gives you 4/5 the experience of prisma :)
all that boilerplate for relations and the overhead when inserting a many-to-many record = 4/5 prisma experience?
I tried to use drizzle but the unique constraint seemed to not be supported
It is now
More I learn about drizzle, more it feels like python's sql alchemy
I was hoping to try drizzle. But this 'relations' thing is a pain.
I agree drizzle is good for querying db but i still prefer to use prisma for creating db but not for queries.
?? what a nonsense
using prisma for no-sql databases and drizzle for sql databases it is so simple why don't anyone understands this thing
sql server support still doesn't exist in drizzle
What are these tweets you speak of? I only know of X’s
x xucks
I don't want to use typescript tho
Please more videos about drizzle
So, where's the drizzle project tutorial?
josch! make a video about firebase 😅
Lol
Hi guys I am newbie, so prisma used for RDBMS right? is it good to store image inside posgresql?
no
You really should NEVER store images inside a database like postgress, mongodob, sqlite, etc. They just aren't meant for this, rather, use S3 or something similar to store images then save the link of the image in the database.
"driiizleee" LOL
How is this simple?
It's super unintuitive, especially when you keep in mind how eloquently prisma manages relationships and many-many more.
I had the same question. I start to think drizzle sponsored Josh or paid him to just say the beauty side of drizzle but didnt mention the overhead of creating schemas in drizzle
I'd rather see a comparison of the generated SQL queries instead of just saying "it's more efficient".
عالی داداش❤
The relations are straightup awful compared to Prisma
Planetscale does not allow a basic db function, fk constraints? Ugghhh
they do now
looks way more complicated than prisma and less efficient
Drizzle sucks in migration no predefined auto migration table to db and in relationship issues
still prisma😢
Brrrr
I prefer Prisma
Ok, now switch to Linux from Windows. Or even Mac, at least.
Seeing a dev using Windows is depressing.
First!
😂why not use prisma and have peace of mind