Prisma Crash Course

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 มิ.ย. 2024
  • Let's look at Prisma, which is a Node.js & TypeScript ORM & toolkit to interact with your database.
    Written Version:
    www.traversymedia.com/blog/pr...
    Check Out My Courses:
    traversymedia.com
    Timestamps:
    0:00 - Intro & What Is Prisma?
    5:30 - What Is Data Modeling?
    6:28 - Getting Started
    9:38 - The Schema File
    10:36 - User Model
    12:29 - Article Model
    14:13 - Running Migrations
    15:45 - Using The Prisma Client
    16:18 - main() Function
    18:00 - Create a User
    19:40 - Get Users
    20:44 - Create Article & Relate User
    23:16 - Create User & Article With One Query
    27:59 - Loop Through Users & Articles
    31:30 - Update Data
    32:37 - Remove Data
    34:23 - Prisma Studio GUI
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 81

  • @PrismaData
    @PrismaData 9 หลายเดือนก่อน +148

    Thank you for creating this! Prisma is committed to enhancing the developer experience in data-related work. Courses like this one contribute to expanding our community, which, in turn, empowers us to craft even more effective tools for all of you. Your efforts are truly outstanding! ❤

    • @arogueotaku
      @arogueotaku 9 หลายเดือนก่อน +1

      Hey @PrismaDev. I have heard a lot of buzz around a certain article pointing out flaws with the current Prisma ORM architecture and how it does its interactions with the DB starting with shipping multiple heavy engines to not supporting native foreign key relations and rather using some kind of emulated ones and a few more performance affecting issues which ultimately made my shy away from it. Are there any truth to those claims and are those being looked into actively?

    • @akhil_sarikonda
      @akhil_sarikonda 9 หลายเดือนก่อน

      @@arogueotaku the article you are talking about is written by codedamn team members, and they know their stuff well. Most of the major performance issues were tackled in the Prisma v5.x.x releases and there is no real reason to not use Prisma in Sep 2023.

    • @nikolasburk
      @nikolasburk 9 หลายเดือนก่อน +1

      @@arogueotaku Hey there 👋 I'm Nikolas from the Prisma team!
      Prisma ORM indeed is based on engine files that are written in Rust, we have an entire page about this in our docs that explains the architecture. The query engine runs as a side-car process on the server where you deploy your application with Prisma ORM. While I can see how this is a different approach compared to other ORMs, I wouldn't consider it a "flaw" in the architecture. As a developer you won't even notice that the engine files exist, the only situation to be aware of them is sometimes during deployment (e.g. when you deploy to Serverless or Edge, in these cases you can check the deployment guides in our docs).
      I can't follow the claim about "emulating foreign key relations", sorry! Prisma ORM definitely supports foreign keys and uses them by default for any relations in your Prisma schema. When you define a relation in the schema, Prisma Migrate generates a SQL migration file for you (which you can also customize) that defines a FK between the two tables that have the relation in your Prisma schema. Does this help or otherwise can you maybe elaborate on what exactly you heard? Can you maybe also share where you have heard that so that we can correct the record there as well?
      Finally, I would definitely always recommend to try out tools yourself instead of "shying away" from them just because of some claims you have heard on the internet 🙂 Prisma ORM is being used very successfully by a plethora of companies (you can check them out on our /showcase page), it's the default ORM for upcoming web frameworks and dev tools like RedwoodJS (founded by GitHub's co-founder), Amplication (recently raised a $6.6M seed round), Wasp Lang (YC W21), KeystoneJS, create-t3-app, Blitz as well as most the official Remix stacks.
      Hope this helps! If you ever have any questions, don't hesitate to reach out! You can find us on Twitter, GitHub and Discord and we're always happy to help 😄

    • @ubitubee
      @ubitubee 9 หลายเดือนก่อน

      @@arogueotakuradio silence… 😢

    • @nikolasburk
      @nikolasburk 9 หลายเดือนก่อน

      Hey there @@ubitubee 👋I had responded to the comment already but it needed to get approved. It now seems to be visible so you can read my reaction to the claims of @arogueotaku now 🙏

  • @ead5590
    @ead5590 9 หลายเดือนก่อน +6

    This is amazing! I'd learnedPrisma through their docs about a year ago, which is really easy to follow and I had it hooked to the Planet Scale DB. It worked effortlessly! This tutorial just adds to all of the awesomeness. 😆 Thanks to Brad and Prisma! ✌🏻

  • @cloudagnostic
    @cloudagnostic 9 หลายเดือนก่อน +7

    There’s a reason you have 2 million subs! Very informative and top tier tutorial. Thanks Brad!

    • @gyongxichen
      @gyongxichen 4 หลายเดือนก่อน

      you damn right!

  • @MarkusEicher70
    @MarkusEicher70 9 หลายเดือนก่อน

    Thank you, Brad. Short, concise and informative. The usual high standard we all are enjoying from you. 🤛

  • @ricardocnn
    @ricardocnn 9 หลายเดือนก่อน +9

    Wow man, I'm studying PostgreSQL, it was exactly what I was going to start studying to implement in my apps. Thanks!

  • @mehrdara6545
    @mehrdara6545 9 หลายเดือนก่อน +3

    Thank you Brad every time I want to learn something new you are my first goto youtube channel

  • @shlomominkowicz65
    @shlomominkowicz65 9 หลายเดือนก่อน +7

    Hey Brad, Excellent video as always!! Clear, strait to the point. It's like breath of fresh air. On the other note, you mentioned re-doing your Next.js course. When could we expect that :)

  • @johndanieldecastro7024
    @johndanieldecastro7024 9 หลายเดือนก่อน

    Thank you Brad! You're carrying my dev journey

  • @ricardocnn
    @ricardocnn 9 หลายเดือนก่อน

    it's so much simple and more straightforward than firebase functions. It's Amazing!

  • @kajalmishra6895
    @kajalmishra6895 9 หลายเดือนก่อน +2

    Wow❕ Brad you read my mind. This is exactly what I need for my project.

  • @binayakgshankar9188
    @binayakgshankar9188 8 หลายเดือนก่อน

    Thanks a ton for this. following your videos since 2016, learned a lot from you.

  • @talleyrand9530
    @talleyrand9530 5 หลายเดือนก่อน

    Good job Brad. You add accessibility to new tech and that’s awesome.

  • @matthewclarke1926
    @matthewclarke1926 9 หลายเดือนก่อน +8

    ORM was a wishful dream of mine once. Ultimately, it is my opinion that you just need to get good at SQL. The time you spend trying to learn the ORM interface and hacking it to get it to do what you want is better spent learning SQL. 10 years from now your knowledge of a particular ORM interface will be worthless and your SQL knowledge will be valuable. Regardless, thanks for posting. I love your videos.

    • @iancarr3923
      @iancarr3923 9 หลายเดือนก่อน

      Have you tried Blazor? The sql can be generated code first (from the models). .Net 8 sounds good.

    • @claudespeed13579
      @claudespeed13579 6 หลายเดือนก่อน +1

      This 100% market-dependant. You could have said the same about React ten years ago: “knowing pure JavaScript is more valuable!” But in truth you can’t really know how ubiquitous ORMs will or will not be in the long run.

    • @matthewclarke1926
      @matthewclarke1926 6 หลายเดือนก่อน

      @@claudespeed13579 React will fall to Vanilla JS.

  • @LaminarRainbow
    @LaminarRainbow 3 หลายเดือนก่อน

    Yes! Traversy Media did a Prisma video!
    Thank you!!

  • @ramioooz
    @ramioooz 8 หลายเดือนก่อน

    Thank you very much for sharing such high-quality educational material. Your lessons are always very clear and straightforward. Thank you 🌻

  • @ramonmaximiliano3557
    @ramonmaximiliano3557 3 หลายเดือนก่อน

    as usual, you are the best!

  • @theophilus494
    @theophilus494 9 หลายเดือนก่อน +2

    see boss! you are a blessing.. thanks so much!!!

  • @GilAguilar
    @GilAguilar 9 หลายเดือนก่อน +1

    Sweet thanks for sharing Brad 🤟💙☕️

  • @rodrigojulianmartin7092
    @rodrigojulianmartin7092 8 หลายเดือนก่อน

    Thanks, this video was great and straight to the point! Super effective. I will subscribe and check other videos from you!

  • @r-i-ch
    @r-i-ch 9 หลายเดือนก่อน +2

    Thanks Brad! I'd love to see this with Drizzle.

  • @genovo
    @genovo 9 หลายเดือนก่อน

    Very clear. One observation: at 24:35 we added "articles" to the user Sara, but made it an object, not an array like in the User model? It worked with SQLite. It's possible to add multiple articles with a user.

  • @aliissa1058
    @aliissa1058 9 หลายเดือนก่อน +1

    You are the best! Thank you

  • @mahmudbakale8190
    @mahmudbakale8190 9 หลายเดือนก่อน +1

    Thank you, so much Brad, you've always been my go to whenever am trying to checkout new stuff in my development journey, but i dont know if can help with a video on Sequilize ORM, thank you once again

  • @SandeepSingh-ye5fh
    @SandeepSingh-ye5fh 9 หลายเดือนก่อน +1

    Thanks for sharing valuable videos ❤

  • @irfansaeedkhan7242
    @irfansaeedkhan7242 2 หลายเดือนก่อน

    thank you its great for getting started

  • @changNoi1337
    @changNoi1337 6 หลายเดือนก่อน

    Thanks from Germany!

  • @Odidi_Bee6ix
    @Odidi_Bee6ix 6 หลายเดือนก่อน

    Spot on.
    Thanks buddy

  • @RABWA333
    @RABWA333 6 หลายเดือนก่อน

    Great effort, thanks alot

  • @alikisang827
    @alikisang827 9 หลายเดือนก่อน +3

    You're a hero, I have developed my own company as your own student, much love Brother 🙏. Come to Kenya vacation I will host you ❤❤

    • @collinskiprono2450
      @collinskiprono2450 9 หลายเดือนก่อน

      Can you employ me in your company 😁, I'm also Kenyan

    • @MelodyBeats.
      @MelodyBeats. 9 หลายเดือนก่อน

      Hindi sayo hindi akin KENYA

  • @fidelotieno2409
    @fidelotieno2409 4 หลายเดือนก่อน

    Thanks for your time sir💯💪

  • @Salah-YT
    @Salah-YT 3 หลายเดือนก่อน +1

    thank u so much 😍👍

  • @gyongxichen
    @gyongxichen 4 หลายเดือนก่อน

    thank you it really helps❤

  • @aburaihan-py4vi
    @aburaihan-py4vi 8 หลายเดือนก่อน

    Excellent!

  • @ar-swe
    @ar-swe 9 หลายเดือนก่อน

    really awesome love you

  • @ronydas5474
    @ronydas5474 9 หลายเดือนก่อน +1

    Interesting ❤

  • @Omar-Tood
    @Omar-Tood 9 หลายเดือนก่อน

    Thanks brad❤

  • @philippearras8154
    @philippearras8154 9 หลายเดือนก่อน

    Thanks a lot !
    I have a question about your courses : are the vidéos downloadable if I want for exemple to watch them offline ?
    Thank you in avance for your answer.

  • @mahmodsamir5110
    @mahmodsamir5110 หลายเดือนก่อน

    thank you so much

  • @feelchi1star
    @feelchi1star 9 หลายเดือนก่อน +1

    This is really educative.
    Can the models in schema.prisma be split into separate files to enhance code readability? Just mongoose ORM.

  • @umitcelik5508
    @umitcelik5508 9 หลายเดือนก่อน +1

    Prisma will save us from sequelize. Finally!

  • @rollinsshadrack8768
    @rollinsshadrack8768 4 หลายเดือนก่อน

    This is amaizing. Can you make one on how to use prisma with Knexjs?

  • @guyrandalf711
    @guyrandalf711 3 หลายเดือนก่อน

    You're so great Brad.❤
    I have an issue when I want to update my tables. The whole database just clears off and resets.
    I am using Supabase, but I use prisma to push migrations. Now I want to update an enum(even though I do this in the database table directly, it doesn't affect the project). So I edited the prisma models.
    How do I add to the enum without actually deleting the database information?

  • @Grishopping
    @Grishopping 9 หลายเดือนก่อน

    Thanks for the video, you have gained a new subscriber.... What is the possibility of releasing a video with more advanced queries, transactions, etc...
    Greetings Jose Grillo from Venezuela

  • @Blacken997
    @Blacken997 9 หลายเดือนก่อน +1

    How do you choose between using Prisma and Knex?

  • @frankylopez4477
    @frankylopez4477 8 หลายเดือนก่อน

    Thanks

  • @j_s_bxpert6160
    @j_s_bxpert6160 5 หลายเดือนก่อน

    Thanks sir

  • @amn3siacx
    @amn3siacx 9 หลายเดือนก่อน

    What VScode Theme is that, I really like it, share your setup pls, thanks!

  • @marktaylor865
    @marktaylor865 หลายเดือนก่อน

    I may have missed it but this didn't show how you might use it in a project. Do I just need the includes at the top of any file I'm doing database actions in? Do I need to make a function call for each query as I need it of should I be dragging in all the data I need at the top of the file? I mean prisma looks great but I still can't use it..

  • @arunsuthar4783
    @arunsuthar4783 9 หลายเดือนก่อน +3

    We want full next js course with typescript

  • @caseyspaulding
    @caseyspaulding 9 หลายเดือนก่อน

    Hell yes

  • @Lavinvlog
    @Lavinvlog 9 หลายเดือนก่อน +1

    Please make a tutorial on remix

  • @esdegan7176
    @esdegan7176 9 หลายเดือนก่อน +1

    G R A P H C O O L
    V 3

  • @jeanssmith5864
    @jeanssmith5864 9 หลายเดือนก่อน

    ❤❤

  • @DontFollowZim
    @DontFollowZim 9 หลายเดือนก่อน +1

    Have you been using it for a while? Have you felt noticeable perf gains after the big update? Have you tried it in an edge runtime environment?

  • @kitebeachinnbeachinn2888
    @kitebeachinnbeachinn2888 9 หลายเดือนก่อน

    Theres a competitor called: DrizzleORM please take a look as well.

  • @nisargjaiswal4264
    @nisargjaiswal4264 9 หลายเดือนก่อน

    Awesome, now its time for Drizzle 🙃

  • @mistart1633
    @mistart1633 8 หลายเดือนก่อน

    Prisma !== Production is true

  • @parkerrex
    @parkerrex 9 หลายเดือนก่อน

  • @_itsmeKHawaR
    @_itsmeKHawaR 9 หลายเดือนก่อน

    Make a course on iOS development.. 23:38

  • @shayantriedcoding
    @shayantriedcoding 9 หลายเดือนก่อน

    If possible, develop a crash course on Laravel Blade and some useful UI libraries (not Breeze), sir please 🥺🙏.

    • @shayantriedcoding
      @shayantriedcoding 9 หลายเดือนก่อน

      @@memberwhen22 Thanks sir 🙏👍

  • @melanatedthought7014
    @melanatedthought7014 9 หลายเดือนก่อน +1

    I swear to the lord christ, I was looking for a crash course on Prisma...can you do one for dribble

    • @olatuborafelix7875
      @olatuborafelix7875 9 หลายเดือนก่อน

      Most you swear 😅😅😅

    • @starlord7526
      @starlord7526 8 หลายเดือนก่อน

      Jesus be like: wtf, when did this happen

  • @PavanKatepalli-fb4ly
    @PavanKatepalli-fb4ly 8 หลายเดือนก่อน

    active record is still so much better

  • @MrLuckfinder
    @MrLuckfinder 9 หลายเดือนก่อน

    Hello my friend!
    Why do you forbid access to your site for users from Russia?
    Does any russian offend you?

  • @Franck_Polla
    @Franck_Polla 2 หลายเดือนก่อน

    thank you very much