Prisma VS Drizzle in NextJS

Поделиться
HTML-код
  • Опубликовано: 13 апр 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/@20KNk
  • НаукаНаука

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

  • @eduardboiko7219
    @eduardboiko7219 26 дней назад

    Exactly the comparison I was looking for, thanks

  • @baymact
    @baymact Месяц назад +3

    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.

  • @sebs4591
    @sebs4591 2 месяца назад +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.

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

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

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

    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 2 месяца назад

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

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

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

  • @CarlosEstebanLopezJaramillo
    @CarlosEstebanLopezJaramillo 2 месяца назад +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 Месяц назад

      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

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

    Could you please share your font settings? Looks neat

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

      Cascadia Code & Consolas 👀

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

    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  2 месяца назад

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

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

    Why are your models lowercase?

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

      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.