Prisma VS Drizzle in NextJS

Поделиться
HTML-код
  • Опубликовано: 27 сен 2024
  • Prisma and drizzle are both the leading typescript ORMs. Prisma takes a more graphiql and high-level way of accessing data, whereas Drizzle gives you a thin wrapper around SQL to get typesafe queries.
    I prefer Prisma because it makes more sense in my mind, and the schema language is beautiful!
    Drizzle on the other hand is not an ORM to sleep on, it gives you the best performance and doesn't have to bundle a huge query engine into your app, also you only ever make one query!
    Check out more about drizzle and prisma on their websites.
    prisma.io
    orm.drizzle.team
    If you enjoyed this NextJS, Prisma and Drizzle content, subscribe to stay up to date with any new videos!
    Screen recording software: screen.studio/...

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

  • @baymact
    @baymact 5 месяцев назад +4

    can you not quickly zoom in and zoom out? it makes me confused. Just increase the font size so you dont need to zoom in the text.

  • @bone_broth_000
    @bone_broth_000 5 месяцев назад +2

    Awesome overview. I feel like the key distinction is that prisma sacrifices performance and fine grained control in favor of better dx. On the other hand drizzle favors predictable and fast execution with a much smaller layer of abstraction in exchange for worse dx. Another point of difference is how they handle migrations. Prisma encourages you to create actual migrations whereas drizzle uses, as far as I understand it, the equivalent of `prisma db push`.
    ps. For us mobile viewers it’d be awesome in future videos if you doubled the zoom level in your editor.

  • @eduardboiko7219
    @eduardboiko7219 4 месяца назад

    Exactly the comparison I was looking for, thanks

  • @centereddev
    @centereddev 5 месяцев назад

    Nice comparison. I haven't used Drizzle extensively, but I'm a huge fan of Prisma and haven't noticed any lack of performance in real world apps. Its certainly easier than what we came from which is Knex and Objection, which was still pretty good! The only weird thing about Prisma is the inability to roll back migrations. Still not quite sure why you can't do that.

    • @karthiknooli
      @karthiknooli  5 месяцев назад

      Agreed, if you mess up a migration on prisma it gets very fiddly!

  • @pathakvivek7865
    @pathakvivek7865 16 дней назад

    Aweful video editing.
    Why so many zoom in and out?
    Stay zoomed in while explaining that part.

  • @mdfitumi
    @mdfitumi 5 месяцев назад +1

    Why are your models lowercase?

    • @karthiknooli
      @karthiknooli  5 месяцев назад

      Honestly not too sure, seen a mix for prisma models. Also plural and singularity. I just try to keep it consistent across each project, don't think it makes a massive difference, just a QoL change.

  • @luizfcavalcanti
    @luizfcavalcanti 2 дня назад

    I don't think this video makes clear the concerns addressed in the comparison. Your focus in DX, the convenience of the developer, despite the performance problems of the example with "upsert". There's a reason you check if something exists... reading twice is still faster and cost less than write twice, so in a scenario you are more likely to already have that record in the database, using upsert as convenient as it is... is not a good solution.

  • @CarlosEstebanLopezJaramillo
    @CarlosEstebanLopezJaramillo 5 месяцев назад +3

    What do you mean by "relations like Prisma"? relations have existed since long ago, the first time I saw the term used was in Ruby on Rails, the only difference is it's called Associations, same with age old Sequelize, in fact the first one I can remember that mentioned Relations specifically was TypeORM, Prisma didn't invent relations...

    • @ceopaludetto
      @ceopaludetto 4 месяца назад

      TLDR: It's just DX sugar
      He probably was referring to the ability to do like query.findOne({ includes: ['other table', 'other table.another'] }) instead of doing a syntax more like a query builder: client.select().from(users).leftJoin(otherTable). If you used drizzle before you know that you can use both drizzle.query and drizzle.select where the first one is more like prisma developer experience and the other one reminds me of the knex days.
      But off course, I understand your point and the whole complication of using the word "relation" incorrectly when referring to relational database theoretical grammar

  • @codaniel
    @codaniel 5 месяцев назад +1

    I like your comparison. I keep going back and forth and which one I want to use.

  • @oleksandr_menchynskyi
    @oleksandr_menchynskyi 5 месяцев назад +1

    Could you please share your font settings? Looks neat

    • @karthiknooli
      @karthiknooli  5 месяцев назад

      Cascadia Code & Consolas 👀

  • @xya6648
    @xya6648 5 месяцев назад

    thx man, the video was really good. I personally have never used drizzleORM but given this video it just looks easier to work with prisma which has been my goto for a big while now

    • @ThomasValadez-tv
      @ThomasValadez-tv 5 месяцев назад

      Wow I didn't know how much I hated Prisma.
      Drizzle is looking good.

    • @karthiknooli
      @karthiknooli  5 месяцев назад

      Glad it helped! Both Prisma and Drizzle have their pro's and con's :)