This Trick Makes My Favorite Database Tool Even Better

Поделиться
HTML-код
  • Опубликовано: 19 янв 2025

Комментарии • 98

  • @mhadi-dev
    @mhadi-dev 10 месяцев назад +2

    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.

    • @DorinEsinenco
      @DorinEsinenco 3 месяца назад

      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?

    • @jsvrs
      @jsvrs 2 месяца назад

      @@DorinEsinenco20 lines of code to write a simple many-to-many relationship schema in drizzle. sure mate

    • @DorinEsinenco
      @DorinEsinenco 2 месяца назад

      @@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

    • @jsvrs
      @jsvrs 2 месяца назад

      @@DorinEsinenco my apologies, I realized I'm talking to a mediocre "developer"

  • @noext7001
    @noext7001 Год назад +42

    the issue with drizzle is many to many relation the syntax is pure garbage

    • @jjrise
      @jjrise Год назад +3

      This is exactly why I haven’t made the switch

    • @sahilaggarwal2004
      @sahilaggarwal2004 Год назад +4

      They will probably fix this too, they are just aiming to kill Prisma completely

    • @jjrise
      @jjrise Год назад +1

      For sure - fingers crossed. I think relations in general confuse me with Drizzle though, not just many to many.

    • @DevvOscar
      @DevvOscar Год назад +1

      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.

    • @TehRoflizer
      @TehRoflizer Год назад +5

      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.

  • @maverick456-33
    @maverick456-33 Год назад +67

    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.

    • @nabinsaud4688
      @nabinsaud4688 Год назад

      +1

    • @lexsemenenko
      @lexsemenenko Год назад +6

      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.

    • @MerthanMerter
      @MerthanMerter Год назад

      most easy to use tool wins. sad bad true.

    • @nvcodes
      @nvcodes Год назад +3

      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.

    • @MerthanMerter
      @MerthanMerter Год назад

      @@nvcodes there is no competition? lols.

  • @poocham
    @poocham Год назад +4

    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 😊

  • @tentacle8148
    @tentacle8148 Год назад +2

    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

  • @pablogtzgileta
    @pablogtzgileta Год назад +3

    Great content as always. It would be awesome if you could do a video creating a complete application using Drizzle for the database

  • @alvaroaquije2572
    @alvaroaquije2572 Год назад +3

    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

  • @sandrinjoy
    @sandrinjoy Год назад +1

    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 .

  • @jonatthu
    @jonatthu Год назад

    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.

  • @JEM_GG
    @JEM_GG Год назад

    So glad you showed this! Just happened to be writing a project in this stack ❤

  • @youssefbedhief2050
    @youssefbedhief2050 Год назад +3

    Josh please make next js, drizzle and TypeScript crash course please, otherwise you're doing a great work ,thank you for everything

  • @anonanon7368
    @anonanon7368 Год назад +3

    The only big problem with drizzle right now is the docs. It's bad and missing many parts.

  • @wfl-junior
    @wfl-junior Год назад

    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.

    • @andrewsherman4610
      @andrewsherman4610 Год назад

      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

  • @daniel_goncalves
    @daniel_goncalves Год назад

    Fatastic. Im wating for the Dashboard Project. Lets Go

  • @jeanpierrejeri6425
    @jeanpierrejeri6425 Год назад +1

    Can we already use drizzle with next-auth? i've been waiting for so long :(

    • @devfren
      @devfren Год назад

      I am, I literally copied and pasted an adapter I found on gh and works great

  • @realcontentfun
    @realcontentfun Год назад +2

    Josh please make next js and also typescript crash course

  • @HenryOsim
    @HenryOsim Год назад

    How can I setup drizzle with next-auth, There doesn’t seem to be an adapter yet?

  • @JEM_GG
    @JEM_GG Год назад

    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 😂

  • @wagyumedia
    @wagyumedia 7 месяцев назад

    It's becoming Django and that's good!

  • @Ga2-20
    @Ga2-20 Год назад

    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?

  • @secretperson-desu5728
    @secretperson-desu5728 Год назад

    How to do transaction with drizzle? Seems like their example doesn't work

  • @imnash_on_E
    @imnash_on_E Год назад

    In Drizzle, I can't find how to seed data in MySQL, Postgres, etc.

  • @kumarvishalben
    @kumarvishalben Год назад

    one thing still not clear, like
    if we do this way, where do we add the onDelete clauses ?

    • @devfren
      @devfren Год назад

      Prisma emulates this behaviour without foreign keys. IIRC drizzle has opinions on cascading deletes so they probably won’t add it

  • @tezismith8795
    @tezismith8795 Год назад +1

    "if you were on twitter you could write 1000 tweets" not if the dude running the show has anything to say about it lmao

  • @developerpranav
    @developerpranav Год назад

    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 :)

    • @jsvrs
      @jsvrs 2 месяца назад

      all that boilerplate for relations and the overhead when inserting a many-to-many record = 4/5 prisma experience?

  • @silknetstudio9104
    @silknetstudio9104 Год назад

    I tried to use drizzle but the unique constraint seemed to not be supported

  • @IgoR.R.
    @IgoR.R. Год назад

    More I learn about drizzle, more it feels like python's sql alchemy

  • @pirog-alex
    @pirog-alex Год назад

    I was hoping to try drizzle. But this 'relations' thing is a pain.

  • @theether5993
    @theether5993 Год назад

    I agree drizzle is good for querying db but i still prefer to use prisma for creating db but not for queries.

    • @jsvrs
      @jsvrs 2 месяца назад

      ?? what a nonsense

  • @sourabhsingh4515
    @sourabhsingh4515 3 месяца назад

    using prisma for no-sql databases and drizzle for sql databases it is so simple why don't anyone understands this thing

  • @Tajdev
    @Tajdev 7 месяцев назад

    sql server support still doesn't exist in drizzle

  • @BenMargolius
    @BenMargolius Год назад

    What are these tweets you speak of? I only know of X’s

  • @cunningham.s_law
    @cunningham.s_law Год назад

    I don't want to use typescript tho

  • @vickoalan
    @vickoalan Год назад

    Please more videos about drizzle

  • @walkingin6375
    @walkingin6375 Год назад

    So, where's the drizzle project tutorial?

  • @elormtsx
    @elormtsx Год назад +1

    josch! make a video about firebase 😅

  • @dwisetyoaji5007
    @dwisetyoaji5007 Год назад

    Hi guys I am newbie, so prisma used for RDBMS right? is it good to store image inside posgresql?

    • @commentdebloquer
      @commentdebloquer Год назад

      no

    • @satindar31
      @satindar31 Год назад +4

      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.

  • @anasouardini
    @anasouardini Год назад

    "driiizleee" LOL

  • @traevelliath
    @traevelliath Год назад +3

    How is this simple?
    It's super unintuitive, especially when you keep in mind how eloquently prisma manages relationships and many-many more.

    • @jsvrs
      @jsvrs 2 месяца назад

      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

  • @PurpleDaemon_
    @PurpleDaemon_ Год назад

    I'd rather see a comparison of the generated SQL queries instead of just saying "it's more efficient".

  • @soheilweb
    @soheilweb Год назад

    عالی داداش❤

  • @Matt-lj2rx
    @Matt-lj2rx Год назад +2

    The relations are straightup awful compared to Prisma

  • @chrishabgood8900
    @chrishabgood8900 Год назад

    Planetscale does not allow a basic db function, fk constraints? Ugghhh

  • @CoIdestMoments
    @CoIdestMoments Год назад

    looks way more complicated than prisma and less efficient

  • @nabinsaud4688
    @nabinsaud4688 Год назад

    Drizzle sucks in migration no predefined auto migration table to db and in relationship issues

  • @kejaa955
    @kejaa955 10 месяцев назад

    still prisma😢

  • @manmaaze
    @manmaaze Год назад

    Brrrr

  • @sburke0708
    @sburke0708 Год назад

    I prefer Prisma

  • @HenriqueNewsted
    @HenriqueNewsted Год назад +4

    Ok, now switch to Linux from Windows. Or even Mac, at least.
    Seeing a dev using Windows is depressing.

  • @surafelkebede299
    @surafelkebede299 Год назад

    First!

  • @solomonogu1393
    @solomonogu1393 Год назад

    😂why not use prisma and have peace of mind