Is Drizzle Really Better Than Prisma?

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

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

  • @zivtamary
    @zivtamary 7 месяцев назад +9

    Kysely as query builder, and Prisma for studio/schemas/migrations ✅

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

      such an unpopular opinion

    • @cant_sleeeep
      @cant_sleeeep Месяц назад

      dude just use something stop overcomplicating stuff

  • @realbigsquid
    @realbigsquid 8 месяцев назад +22

    Drizzle is pretty great. I spent so much time fighting with prisma do get it to do what I wanted. Although I did have to write a library worth of custom types for drizzle , i was able to get it working

    • @snipernosnipey8162
      @snipernosnipey8162 6 месяцев назад +1

      thats what copilot is for

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

      ​@@snipernosnipey8162Copilot is unreliable lol

  • @gavrshchuk
    @gavrshchuk 8 месяцев назад +108

    Waiting for a new Prizzle ORM after a few weeks 🥴

    • @ravi_sorathiya
      @ravi_sorathiya 8 месяцев назад

      Just go the Laravel bubble for 2 week and you will find this thing absolutely trash

    • @flavourfulski
      @flavourfulski 8 месяцев назад +29

      rizzma

    • @dev.antunes
      @dev.antunes 7 месяцев назад +2

      @@flavourfulski ligma

  • @jeduan
    @jeduan 8 месяцев назад +33

    The code for product discounts at 10:22 is an N+1 query which is bad. Drizzle’s lack of magic makes it more clear what’s going on behind the scenes

    • @xavier.whisper.underneath
      @xavier.whisper.underneath 7 месяцев назад +1

      Is the way Prisma is doing avoiding N+1 query or not really?

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

      @@xavier.whisper.underneath not really

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

      @@xavier.whisper.underneath not really

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

      Yes, the author should be passing an array of values to db.insert(productDiscountCode).values() in the drizzle example.
      To be fair to Prisma, it's also possible to separate productIds into a call to db.productDiscountCode.createMany() rather than using the connect syntax.

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

      @@xavier.whisper.underneath Behind the scenes, it's still creating all those queries for every inserted object, so it's still N+1, but from the perspective of a developer, it doesn't look like it. With Drizzle, you immediately see it

  • @Leo-tf7gu
    @Leo-tf7gu 8 месяцев назад +12

    ORMs like Prisma etc. generate large files when you have 100s of relational tables. Specially when you use extra plugins for validations and such, it quickly starts to unravel. Best for smaller apps with less than 30 tables. The amount of code / metadata generated by Prisma and other plugins is humungous.

    • @0.amonymous
      @0.amonymous 7 месяцев назад +1

      I like that point of view. We mostly read people having a very black/white view on things. One is good other is bad. For me as a solo dev in a project I prefer the simplicity and DX of prisma, drizzle syntax is a lot more complex imo, but I can see how it's better at bigger or different types of projects.

    • @prawnstars3160
      @prawnstars3160 6 месяцев назад +1

      @@0.amonymous
      drizzle syntax literally looks like standard SQL. dunno what u mean by more 'complex'

    • @0.amonymous
      @0.amonymous 6 месяцев назад +1

      @@prawnstars3160 I think the whole point of Prisma was DX. Meaning it abstracts a lot of complication mainly from the model definition and does it for you, like for example creating many to many relations being literally just 2 different lines, it's so easy to do and to read/analyse. But if I hit speed bottlenecks in the future I'd gladly switch to drizzle

  • @acolyte0
    @acolyte0 8 месяцев назад +7

    Thank you for your thorough research. I needed the expert's opinion about those two.

    • @mistart1633
      @mistart1633 8 месяцев назад +1

      Expert is a big word

    • @48265868
      @48265868 Месяц назад

      haha calling someone an expert who talks about ORM xD Learn SQL kiddo

  • @lapppius
    @lapppius 8 месяцев назад +8

    Drizzle is the first ORM I've used. I like that it uses TypeScript instead of Prisma's own solution, and that it's closer to SQL. However, I believe it's not mature enough yet to implement it in a big project in a productive way. I spent a couple of days setting up Drizzle with NextAuth, only to find out that the Drizzle Adapter doesn't implement some features Prisma offers out of the box , which would have saved me lots of time.

    • @ProtectedClassTest
      @ProtectedClassTest 8 месяцев назад

      Will be implementing nextauth adapter soon, what issues di you face with drizzle?

    • @Finch-Bro
      @Finch-Bro 8 месяцев назад +2

      yep, and I prefer the syntax of Prisma. easy to understand

    • @karlstein9572
      @karlstein9572 8 месяцев назад

      I don't know if Drizzle follows the semver, but the version is not yet 1.0.0, which usually means "ready for production".

    • @marcuss.abildskov7175
      @marcuss.abildskov7175 7 месяцев назад +1

      Drizzle is not an ORM.

  • @mikr13
    @mikr13 8 месяцев назад +4

    I've fought so much with Prisma to get performance in cases of join. Ended up writing my own statement cuz Prisma does join very inefficiently with on and stuff. Hope this solves it!

  • @the_yugandharr
    @the_yugandharr 8 месяцев назад +20

    Looking forward to the drizzle crash course!

  • @emman10
    @emman10 8 месяцев назад +9

    The insert method of Drizzle ORM also accepts arrays, allowing you to insert multiple discounts...

    • @luca4479
      @luca4479 8 месяцев назад

      I did not know this… Thanks bro!

    • @jonnyborgesdev
      @jonnyborgesdev 8 месяцев назад

      Exactly!

  • @hemanticr
    @hemanticr Месяц назад

    An excellent comparison. Thanks!

  • @PartneredAdmin
    @PartneredAdmin 12 дней назад

    Love your vids!!! Please create a video: "How to convert from prisma to drizzle orm in latest Next.js LTS with absolutely zero issues!"

  • @congminhluu5068
    @congminhluu5068 8 месяцев назад +5

    I'm liking Kysely + Prisma. Although you can argue that it's a lot of overhead

    • @NewTypeStarling
      @NewTypeStarling 8 месяцев назад

      Why, why whyyyyyyyy

    • @jonnyborgesdev
      @jonnyborgesdev 8 месяцев назад +5

      For God, no!!!! I used to have Kysely + Prisma in my projects, and now I have SO MANY PERFORMANCE PROBLEMS that I could not recommend it to anyone! It is serious, man, stop, just stop, it will kill you. Please, PLEASE, NOOOOO!

    • @congminhluu5068
      @congminhluu5068 8 месяцев назад +1

      @@jonnyborgesdevperformance problem how ? With that combo you would ONLY use prisma migrate system with its schema file (so no touching prisma client) and then it's just sql with kysely?
      How on earth would you run into performance problems with just sql? Did you also use prisma to do things which defeat the purpose of kysely ???

    • @NewTypeStarling
      @NewTypeStarling 8 месяцев назад

      then it is ok@@congminhluu5068

    • @zivtamary
      @zivtamary 7 месяцев назад +2

      @@jonnyborgesdev Elaborate? I find Kysely + Prisma to be the best combination we've ever used in a project. and the performance increased a lot more than using plain prisma

  • @radimhof
    @radimhof 7 месяцев назад +1

    I use Kysely. It's the best. And prisma for schema and migrations.

  • @reedlaww
    @reedlaww 8 месяцев назад +1

    I really wanted to like Prisma, but I couldn’t get its rust-powered tooling build/migrate on a remote CI/CD pipeline in conjunction with Turborepo. Drizzle is a happy medium and has the big benefit of just being a JavaScript library.

    • @hanserlabber4164
      @hanserlabber4164 8 месяцев назад

      What is your exact Problem (I am also using turborepo in my project)

    • @reedlaww
      @reedlaww 8 месяцев назад

      @@hanserlabber4164 The relative pathing to the prisma binaries would break (ex. @packages/db), which I got around with some build-scripts. But the dagger was npm install would install a binary that was incompatible with the target linux env of my build agent.
      It all worked great locally inside a docker dev container. So if you have the ability to deploy as containers I bet it would work better. I didn't have that option unfortunately.

  • @mac.ignacio
    @mac.ignacio 8 месяцев назад +2

    A good example of Imperative vs Declarative syntax.

    • @BeBoBE
      @BeBoBE 8 месяцев назад

      Wouldn't call Prisma declarative, you're still creating rows and such yourself, it's just a little bit more declarative since you can for example add children directly when creating a row. If you want a declarative ORM you might want to take a look at MikroORM.

    • @mac.ignacio
      @mac.ignacio 8 месяцев назад +1

      @@BeBoBE I think you dont know what declarative means. In Prisma you just need to declare what you want the row to be created. In Drizzle you are imperatively doing the creation of the row.

  • @Nextdesu
    @Nextdesu 7 месяцев назад +2

    so far only thing that feels strange in drizzle is pgTable and other such staff like if i want to change database i would have to siginifically change my code.

  • @NachoNoCodea
    @NachoNoCodea Месяц назад

    I've seen my guys videos for a while now and i just noticed how much he wobbles his head left and right constantly, now i cannot stop seeing it

    • @jsvrs
      @jsvrs Месяц назад

      bobblehead

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

    Thank you, Kyle.

  • @Jacek2048
    @Jacek2048 8 месяцев назад +19

    Finally someone showed what a DX nightmare Drizzle is, especially when it comes to relations. It is a deal breaker to me.

    • @akash-kumar737
      @akash-kumar737 8 месяцев назад +8

      What your thoughts on Prisma which struggle with performance and perform unwanted queries for join statements.

    • @dipteshchoudhuri
      @dipteshchoudhuri 8 месяцев назад +4

      ​@@akash-kumar737It does not really matter unless you are working on a very large scale.

  • @buzz1ebee
    @buzz1ebee 8 месяцев назад +7

    Prisma has always been weird. Typeorm has been serving us very well for years. Drizzle is just like a slightly lower level typeorm.

  • @ThiagoVieira91
    @ThiagoVieira91 8 месяцев назад +13

    Kyle, do you know if Drizzle also has performance gains for row reading? From what I know Prisma reads all rows from a given table, then filters the request data in its Rust binaries. It can be costly.
    Does Drizzle only read the rows specified in a given query?

    • @KennEjima
      @KennEjima 8 месяцев назад +11

      Yes. Better yet, Drizzle guarantees a single call always results in a single SQL.

    • @ThiagoVieira91
      @ThiagoVieira91 8 месяцев назад +1

      @@KennEjima Awesome! This is the performance I was looking for! I have little knowledge in SQL, so I will keep starting my projects using Prisma, then migrate to Drizzle for production.

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

      Prisma don't scan all the table every time. It create a query with all condition you determine.
      Prisma can ignore distinct field and filter it only in Rust. Also Prisma don't create joins and filter by joins only in Rust after 2 sequential queries. But these cases are the only, for usual crud operations Prisma create a corresponding query with your filter conditionz

  • @pomprocks
    @pomprocks 8 месяцев назад +258

    Why learn SQL when you can learn a dozen ORMs instead?

    • @richardbray
      @richardbray 8 месяцев назад

      Because there are still things only SQL can do like common table expressions, views and stored functions which are super useful for complex queries ruclips.net/user/shortsjLcbLVaz4ms

    • @cusematt23
      @cusematt23 8 месяцев назад +13

      So true 😂

    • @alesholman801
      @alesholman801 8 месяцев назад +110

      Why use ORMs for autocompletion, type safety, faster development, better development experience, scalebility... When you can use raw SQL 🤡

    • @0b3ryn29
      @0b3ryn29 8 месяцев назад +16

      Just raw dog it bro 😂

    • @piscopancer
      @piscopancer 8 месяцев назад +10

      good trolling

  • @matrix8934
    @matrix8934 8 месяцев назад

    I don’t have much experience with node backends(the only project I’ve worked on used kysely), I haven’t used drizzle nor prisma, but looking at your examples I see why people might want to use prisma and why I already hate it. Drizzle seems to be much more like an actual query builder as opposed to prisma which tries to abstract away everything. Having worked with such solutions in other languages it was always great until the abstractions broke in unexpected ways, like hibernate generating a few hounded joins where two would suffice

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

    With prisma you get 50% of performance... i think it's the same with drizzle. When you have complicate query, orm will fail. I tried prisma and now i use raw sql query.

  • @alfaloverss3116
    @alfaloverss3116 Месяц назад

    Which is better prisma and drizzle

  • @DomskiPlays
    @DomskiPlays 8 месяцев назад

    While I knew just about all of this already, it's great to see your examples and explanation for people that didn't and are just trying to pick their ORM. Great video!

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

    I like the ease of use and simplicity of Prisma.

  • @ogbillity
    @ogbillity 8 месяцев назад +1

    Drizzle is the way to go. If you are not comfortable with the SQL like syntax, you can use the query.

  • @DrsHWolfenstein
    @DrsHWolfenstein 8 месяцев назад +2

    ORM's are a bit too invasive for me. A good Query Builder (Kysely) has the same benefits but stays closer to SQL and doesn't take over your project.

  • @bbbo85
    @bbbo85 8 месяцев назад

    If 10% more code means I can have control and speed, drizzle all the way for me. I've experienced enough of Prisma's definition mismatch due to delayed codegen to be a loving fan.

  • @alephzero7808
    @alephzero7808 8 месяцев назад +1

    As a front end developer I have never heard of any of this

  • @ahmedaq9018
    @ahmedaq9018 8 месяцев назад

    Thanks a lot for the great video… Please consider creating a short tutorial on implementing live updates (real time) notifications for a very simple social media functionality like (some liked your post). Simple app the aim of which is to show how to implement notifications (not chat app) in Nextjs 14 with the server actions. TS optional but preferable! 😅

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

    From some times I start to use objection-js as orm and knex-js as query builder if I need low level control. Also there is Kysely from creator of objection, but I dont used it before

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

    Great video!

  • @mumk
    @mumk 8 месяцев назад +13

    I will still be rooting for Prisma

  • @himelrana6594
    @himelrana6594 6 дней назад

    I think drizzle inspired by Laravel ORM and Prisma inspired by Django ORM. php developer could love drizzle other side Python developer should love prisma

  • @SeanCassiere
    @SeanCassiere 8 месяцев назад +1

    As someone who moved over from Prisma to Drizzle, it mostly came down to Prisma's horrible SQL perf and the overall level of "magic" it uses to power its DX.
    Prisma's "magic" also doesn't play well in production, with serverless environments and mono-repos either, because of how it needs to generate individual underlying Rust engines and generate the typescript types off of that before you even get to the "tsc build" step of your app. I'm not saying that it can't be done, but it is a 'non-zero' amount of time which can feel horrible when applied to a real production codebase. Contrast this with Drizzle where it's all just typescript... that's it.
    Also, as you start writing bigger apps with beefy databases, and you start running more complex queries on your DBs, I've found that the overhead required to run my queries through Prisma just isn't worth the performance hit that I end up taking.
    Running a Prisma query has the following overall flow: Send an instruction from the JS-layer to the Rust engine, hopefully the engine generates something close to a performant SQL statement-set, execute the _statements_ in the engine, get the response and parse it in the engine, and finally return the validated response to the JS-layer. With Drizzle, I'm really just running an "SQL statement"... that's it.

  • @curiouslycory
    @curiouslycory 8 месяцев назад +1

    I love the t3 stack (create-t3-app ftw!) so of course I tried drizzle when they added it as the preferred ORM for the stack and I felt SO much more friction when using it compared to prisma. I really appreciate your breakdown as it helps me see a few of the benefits that I couldn't quite see from the depths of learning curve hell.

  • @zoki5388
    @zoki5388 8 месяцев назад +2

    Real man write queries 💪
    Only thing I like from them is studio.

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

    Got recommended drizzle to me. I had never heard of otr

  • @the_yugandharr
    @the_yugandharr 8 месяцев назад +2

    Lesgooo Drizzllleeee!!!

  • @Nischal.shetty02
    @Nischal.shetty02 8 месяцев назад +3

    Just when you feel like you learned something good enough, something new comes up(not saying it in a bad way but we need the urge to learn constantly in this field)

    • @MrHellmager
      @MrHellmager 8 месяцев назад +2

      You don’t have to learn all the new tech

  • @aqibmalik6313
    @aqibmalik6313 8 месяцев назад

    hey Kyle, when is the big video coming that u talked about in ur previous video
    im eagerly waiting

  • @GhafoorRAHMANI
    @GhafoorRAHMANI 8 месяцев назад +1

    Hi I have an idea 💡 can you create youtube video downloaded using javascript? I hope hear from you

  • @JayDoge
    @JayDoge 8 месяцев назад +2

    Orchid ORM has entered the chat

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

    - prisma doesnt work on some serverless environments, like supabase, because the underline engine connects to dbs though a tcp connection and deno in edge function doesnt have a tcp engine.
    - to address that, and i assume similar issues, they have created accelerate, which prisma successfully connects to through https, and its like a cache level for you db from what i understand.
    - accelerate costs more money, so i dont see it as a selling point, they couldve fixed thr underlying issue -_-
    Just use drizzle tbh

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

      Don't mind them

  • @mokshchadha9151
    @mokshchadha9151 8 месяцев назад +13

    which is better prisma or drizzle
    me still using sequalize

    • @mrika1995
      @mrika1995 8 месяцев назад

      HI, can i ask you one question? (if u do this stuff)
      How you manage filter paramas in a GET request? how you work with operators?
      like in prisma you can simply use NOT:{id:3} , {age:{lte:18}}, ecc.
      In sequelize you have like Op.gt, Op.in ecc.. But you can't use them from the client or im wrong?
      When request is static and with same filters its ok, but like my clients have a feature like visual query builder, and always be boring with other orms to manage the request params
      Thanks

    • @mokshchadha9151
      @mokshchadha9151 8 месяцев назад

      @@mrika1995 i have a mapping for my request params and my table columns for example i use something like
      route/?gender=not_male
      and in the code handle the validation of query separately

    • @mrika1995
      @mrika1995 8 месяцев назад

      @@mokshchadha9151 Can you make me an esemple with more complex/nested object filter?
      how the server understand not_ or_ gte_ ecc? like if includes("_")?
      Thanks

  • @thomasfuchsberger3912
    @thomasfuchsberger3912 8 месяцев назад +2

    I love TypeORM!

  • @ravi_sorathiya
    @ravi_sorathiya 8 месяцев назад

    Just imagine how cool is laravel
    Really is way ahead of time😊

  • @ryangamv8
    @ryangamv8 8 месяцев назад +11

    That Prisma uses it's own weird rust engine and doesn't just do single queries, doesn't allow you to do left, right joins, etc. should be a non starter. Just learn SQL and use Drizzle

    • @BarisPalabiyik
      @BarisPalabiyik 8 месяцев назад +5

      Half of your sentence is outdated if I am not mistaken, give it a look. They sorted many of the stuff you mentioned.

  • @waseemtahir6740
    @waseemtahir6740 8 месяцев назад +1

    OK, so if you are building a portfolio project or just starting out use Prisma, but if you're building for production, then you'll have to use Drizzle. By the looks of it Prisma would be a nightmare while the system scales.

  • @MonsterSmart
    @MonsterSmart 23 дня назад +1

    Why don't just use sql?

    • @rahulsiddhardh3701
      @rahulsiddhardh3701 12 дней назад

      What about typesafety, readability and coding fast

    • @MonsterSmart
      @MonsterSmart 12 дней назад +1

      what makes you think using sql makes coding slower? You just saying things just for sake of opposing aren't you..

  • @michaelhays
    @michaelhays 8 месяцев назад +2

    "Just use SQL" is my least favorite take in software development. I don't understand how you can stomach the DX of plain SQL when there is an intuitive, readable, popular, type-safe ORM available (Prisma) that hardly takes any time to learn or understand.
    Literally just compare the queries! There's not even an argument for me

    • @boenrobot
      @boenrobot 8 месяцев назад

      The syntax for defining tables and relations in Prisma seems like almost equivalent to SQL.
      If you write SQL first, and have an ORM with code generator for the sake of generating type safe models, you can extract more out of your database's capabilities, while still getting the DX benefits.

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

    So, I played with both for about 2 weeks. Drizzle is not ready for prod IMO. The combination of lack of docs, the current state of the docs (you will find conflicting instructions because it is evolving so fast, and no 2 articles will even show you the same thing, and even this video is guilty of this), the likelihood of things changing significantly, and their focus on things that do not matter (like, use dbeaver or similar to look at your databases, this is a stable tool with every bell and whistle you could ever want, for free) make me want to wait till 1.2 or later. Its a neat idea and IMO a better approach and syntax, but its not there yet.

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

    Hey can you help me in my build about prisma getting some errors aint getting what the heck are they.

  • @NathanielBabalola
    @NathanielBabalola 8 месяцев назад

    Haven't tried it yet because I heard they truncate tables a lot when running migration

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

    Drizzma & Prizzle

  • @KevinVandyTech
    @KevinVandyTech 8 месяцев назад +1

    yes it is

  • @reze_dev
    @reze_dev 4 месяца назад +2

    When learning ORMs is harder than learning SQL query 🤓

  • @Methapon2001
    @Methapon2001 8 месяцев назад

    Drizzle also have query like prisma interface like find in prisma isn't it. On query not insert update and delete.

  • @OnFireByte
    @OnFireByte 8 месяцев назад

    10:35 didn’t drizzle let you do multiple insert? It’s way better than calling insert multiple times

    • @WebDevSimplified
      @WebDevSimplified  8 месяцев назад +1

      Yes. You can do multiple inserts in one statement. That would be better, but this repo was purely a demo that I was using to learn/compare Drizzle to Prisma so this was pretty quick and dirty.

    • @OnFireByte
      @OnFireByte 8 месяцев назад

      @@WebDevSimplified fair enough, great content!

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

    short answer, yes

  • @tom.watkins
    @tom.watkins 8 месяцев назад

    Prisma provides you with a nice DX but that's where the positives end for me, their weird rust engine is so bad for performance when working with any reasonable amount of data. That and the fact is ships with a big binary is problem. I also much prefer writing my schema in typescript than prismas own schema language, the fact its marginally more verbose is a small price to pay for the flexibility it gives you

  • @andyslack1167
    @andyslack1167 8 месяцев назад +1

    TypeORM ++

  • @danieldanish2453
    @danieldanish2453 8 месяцев назад

    does prisma supprot uuid in postgres ? can u do an exemple

    • @jonnyborgesdev
      @jonnyborgesdev 8 месяцев назад

      1: Yes it supports it, just add @default(uuid()) but you SHOULDN'T. There is no single good reason for you to use uuid in 2024, Prisma supports cuid too (which is better than uuid in literally everything). I use Snowflake, and I have prism.$extends to add support for it, because Snowflake is better for larger systems, but cuid is good enough for all types of systems, and uuid or autoincrement are not good for anything.

  • @CeezGeez
    @CeezGeez 8 месяцев назад +3

    yeah... but have you used drizzma?

    • @idmt93
      @idmt93 8 месяцев назад +1

      I prefer prizzle

  • @geebsayshi
    @geebsayshi 8 месяцев назад +1

    Prisma >>>>>

  • @donmorris4506
    @donmorris4506 8 месяцев назад +2

    Sticking to sequelize for sql databases. It’s all I need.

  • @ruslansergazin8239
    @ruslansergazin8239 8 месяцев назад

    I dont understand why devs of prisma or drizzle dont want to implement DSL in migrations. Native sql in migrations is such kringzh. So, I think that sequelize and typeorm are much better.

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

    can you please do another video on Prisma's typedSQL , prisma pulse and prisma accelerate there isn't much content on them other than prisma's YT channel which of course will be biased

  • @MamadouNDalabaDiallo
    @MamadouNDalabaDiallo 8 месяцев назад +5

    TypeORM is the best.

  • @salmanhaider14
    @salmanhaider14 8 месяцев назад +2

    While prisma can work with all kinda dbs, seems like drizzle was specifically made for relationsal databases. As it's syntax is pretty similar to the sql. Well, imo until you need more control over your queries whic you won't need that often, prisma is fine. Prisma is good enough to handle everything, easy to use and pretty straight forward.
    Btw these js ORMs are not anywhere close to the C#'s EFCore.

    • @ProtectedClassTest
      @ProtectedClassTest 8 месяцев назад

      Sad that C# is unloved, js is so far behind in terms of framework and libraries

  • @thesilentkiller3882
    @thesilentkiller3882 8 месяцев назад

    Prisma is more beginner friendly but drizzle is much better in the long run.

  • @emil.vladev
    @emil.vladev 8 месяцев назад

    There's a really great ORM that sits somewhere between drizzle (query builder) and Prisma (high-level data management) - it's called objection.js. It nails down the ORM part, it deals well with relations, it's bullet proof. The only thing it lacks is the nice Typescript support (many things are just strings).

    • @stupidgameprizes
      @stupidgameprizes 8 месяцев назад

      Creator of Objection.js has left the project. He started Kysely to replace Objection.js.

  • @voidmind
    @voidmind 8 месяцев назад +4

    I find the migration stuff confusing. If I already have a database and I just want Drizzle to connect to it, do I need that?

    • @tipeon
      @tipeon 8 месяцев назад +2

      You don't.
      But once you grow your team to more than one person, or you deploy several iterations of your application, then you'll see the value of migrations.
      It's OK to start small, learn the essentials, feel the pain, and then add more sophisticated tools to your toolbelt.

    • @tom.watkins
      @tom.watkins 8 месяцев назад

      Drizzle kit can introspect an existing database to create a schema I believe

  • @BSTGMR-kj3tu
    @BSTGMR-kj3tu 8 месяцев назад

    Lets goooooooooo

  • @neutralitat2570
    @neutralitat2570 8 месяцев назад +3

    drizzle === hype

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

    I'd still use Prisma

  • @alptekinocakdan
    @alptekinocakdan 8 месяцев назад

    Let's say I have a full-fledged, complex E-commerce Backend and Frontend. With the whole management scenario, this backend allows to manage multiple stores and allows to add new ones. Which ORM would be better for this? If I learn it now, I want to understand if it will benefit me in the 1-2 month project I want to start.

    • @elmalleable
      @elmalleable 8 месяцев назад +1

      You can flip a coin or make a cost benefit table. Prisma is convinient, hit the ground running and dx is great save for ts types if you need that. Drizzle will give you types But can get in your way for minor times when you have type mismatch or if you are using validations. Either works. Pick your poison. Want to eat noodles with a fork or chopsticks?

  • @DerberAlter
    @DerberAlter 8 месяцев назад +6

    the simpler, the better. prisma wins in about 90%+ of cases

    • @spectr__
      @spectr__ 8 месяцев назад +2

      Man, if prisma is simpler and better, I dont wanna get near drizzle.

  • @Kayotesden
    @Kayotesden 8 месяцев назад +10

    But Kyle...
    we have Kysely...

    • @DarkzarichV2
      @DarkzarichV2 8 месяцев назад +1

      Kysely is great for a smaller project if you want to just focus on the queries that get data with a simple type-safe query builder, without much overhead and stuff.
      If you have a complicated db with a lot of relationships between entities and need ORM features like easy migrations, better and stronger type-safety - DrizzleORM is definitely the choice

    • @DrsHWolfenstein
      @DrsHWolfenstein 8 месяцев назад

      @@DarkzarichV2 In my experience ORM's are great for very simple crud style queries and fail on the more complex joins. This is especially bad if you rely on typed query responses as switching to raw queries requires manually typing the response.

  • @thedelanyo
    @thedelanyo 8 месяцев назад

    Drizzle is fairly easy to setup

  • @Person123-z9q
    @Person123-z9q 8 месяцев назад

  • @johanexxxx
    @johanexxxx 8 месяцев назад +1

    For drizzle my nizzle.

  • @RasmusSchultz
    @RasmusSchultz 8 месяцев назад

    If you don't know SQL, learn that before choosing an ORM.
    Once you know SQL, you don't need an ORM. 🤫

  • @sajalhsn13
    @sajalhsn13 8 месяцев назад

    What is the point of a ORM? Isn't SQL itself beautiful?

  • @ricko13
    @ricko13 21 день назад

    Lucid ORM

  • @riteshregmi5594
    @riteshregmi5594 8 месяцев назад +4

    Drizzle is awesome

  • @horacioserrano5430
    @horacioserrano5430 6 месяцев назад

    Not using non standard languages is a HUGE drizzle pluss.

  • @spectr__
    @spectr__ 8 месяцев назад +2

    Honestly, what is the use of any of these, over just writing queries? Tried Prisma once and it was just super slow and bureaucratic, only delaying the project.

    • @yohanneskindu8794
      @yohanneskindu8794 8 месяцев назад

      These simplify most of the queries you write, which enable you to work on projects faster without much of performance tradeoffs, for complex and performance requiring functionalities, using SQL queries might be the way to go.

    • @jonnyborgesdev
      @jonnyborgesdev 8 месяцев назад

      Safety??????

    • @spectr__
      @spectr__ 8 месяцев назад

      @@jonnyborgesdev safety in what sense?

  • @horacioserrano5430
    @horacioserrano5430 6 месяцев назад

    As of a few days ago, Drizzle no longer works with NextJs...

  • @hanserlabber4164
    @hanserlabber4164 8 месяцев назад

    Hi Guys, One problem in my eyes is the TypeScript support. Prisma's TypeScript support is at version 4.7.0 but my project is running version 5.3.3.
    Prisma has a better DX for me than Drizzle when it comes to complex queries, and I have really complex queries in my project. I don't want to write raw SQL, and the limitations of Prisma are completely okay for my queries. However, if I cannot fix the TypeScript problem, I cannot use it due to missing type safety.
    Am I the only one who is struggling with this? It would be nice if you could give me some advice. @web

    • @hanserlabber4164
      @hanserlabber4164 8 месяцев назад

      Oh I think the Problem IS only in 5.3 or so ... Because 4.7.x should be the Minimum requirement. Some one Test IT with some 5.x Version?

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

    Frontend devs will do EVERYTHING to not touch squeel

  • @WendiCahyono-yf7xc
    @WendiCahyono-yf7xc 7 месяцев назад

    drizzle is just like sql wrapped in typescript

  • @0xtz_
    @0xtz_ 8 месяцев назад

    we all need to drizzle 💧

  • @WalidAra
    @WalidAra 8 месяцев назад +2

    i just learnt prisma , dont give me a other headache

    • @saywaify
      @saywaify 8 месяцев назад +1

      Keep using it. It' fine. Plus I think they are fixing the major concerns developers have with it

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

    we write more code in drizzle to write less code and we write less code in prisma to write more code

  • @ts8960
    @ts8960 8 месяцев назад

    prisma is superior

  • @MrCowch
    @MrCowch 8 месяцев назад

    I like this just waiting for sql server to be implemented then I can drop prisma lol