Prisma Crash Course

Ғылым және технология

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

Пікірлер: 82

  • @PrismaData
    @PrismaData8 ай бұрын

    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

    8 ай бұрын

    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

    8 ай бұрын

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

    8 ай бұрын

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

    8 ай бұрын

    @@arogueotakuradio silence… 😢

  • @nikolasburk

    @nikolasburk

    8 ай бұрын

    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 🙏

  • @shlomominkowicz65
    @shlomominkowicz658 ай бұрын

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

  • @ead5590
    @ead55908 ай бұрын

    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! ✌🏻

  • @ricardocnn
    @ricardocnn8 ай бұрын

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

  • @MarkusEicher70
    @MarkusEicher708 ай бұрын

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

  • @mehrdara6545
    @mehrdara65458 ай бұрын

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

  • @ricardocnn
    @ricardocnn8 ай бұрын

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

  • @cloudagnostic
    @cloudagnostic8 ай бұрын

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

  • @gyongxichen

    @gyongxichen

    3 ай бұрын

    you damn right!

  • @kajalmishra6895
    @kajalmishra68958 ай бұрын

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

  • @johndanieldecastro7024
    @johndanieldecastro70247 ай бұрын

    Thank you Brad! You're carrying my dev journey

  • @theophilus494
    @theophilus4948 ай бұрын

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

  • @r-i-ch
    @r-i-ch8 ай бұрын

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

  • @SandeepSingh-ye5fh
    @SandeepSingh-ye5fh8 ай бұрын

    Thanks for sharing valuable videos ❤

  • @mahmudbakale8190
    @mahmudbakale81907 ай бұрын

    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

  • @aliissa1058
    @aliissa10588 ай бұрын

    You are the best! Thank you

  • @rodrigojulianmartin7092
    @rodrigojulianmartin70927 ай бұрын

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

  • @GilAguilar
    @GilAguilar8 ай бұрын

    Sweet thanks for sharing Brad 🤟💙☕️

  • @binayakgshankar9188
    @binayakgshankar91887 ай бұрын

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

  • @talleyrand9530
    @talleyrand95304 ай бұрын

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

  • @genovo
    @genovo8 ай бұрын

    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.

  • @philippearras8154
    @philippearras81548 ай бұрын

    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.

  • @matthewclarke1926
    @matthewclarke19268 ай бұрын

    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

    8 ай бұрын

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

  • @claude3957

    @claude3957

    5 ай бұрын

    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

    5 ай бұрын

    @@claude3957 React will fall to Vanilla JS.

  • @aburaihan-py4vi
    @aburaihan-py4vi7 ай бұрын

    Excellent!

  • @ramioooz
    @ramioooz6 ай бұрын

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

  • @ronydas5474
    @ronydas54748 ай бұрын

    Interesting ❤

  • @feelchi1star
    @feelchi1star8 ай бұрын

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

  • @LaminarRainbow
    @LaminarRainbow2 ай бұрын

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

  • @user-uy4qp1qx3n
    @user-uy4qp1qx3n5 ай бұрын

    Awesome!. Thanks for making videos like this. Really enjoy your videos. Please, make more videos like this!.

  • @ramonmaximiliano3557
    @ramonmaximiliano35572 ай бұрын

    as usual, you are the best!

  • @alikisang827
    @alikisang8278 ай бұрын

    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

    8 ай бұрын

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

  • @MelodyBeats.

    @MelodyBeats.

    8 ай бұрын

    Hindi sayo hindi akin KENYA

  • @Blacken997
    @Blacken9978 ай бұрын

    How do you choose between using Prisma and Knex?

  • @Omar-Tood
    @Omar-Tood8 ай бұрын

    Thanks brad❤

  • @ar-swe
    @ar-swe8 ай бұрын

    really awesome love you

  • @Lavinvlog
    @Lavinvlog7 ай бұрын

    Please make a tutorial on remix

  • @amn3siacx
    @amn3siacx8 ай бұрын

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

  • @irfansaeedkhan7242
    @irfansaeedkhan7242Ай бұрын

    thank you its great for getting started

  • @Grishopping
    @Grishopping8 ай бұрын

    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

  • @umitcelik5508
    @umitcelik55088 ай бұрын

    Prisma will save us from sequelize. Finally!

  • @Odidi_Bee6ix
    @Odidi_Bee6ix4 ай бұрын

    Spot on. Thanks buddy

  • @RABWA333
    @RABWA3334 ай бұрын

    Great effort, thanks alot

  • @gyongxichen
    @gyongxichen3 ай бұрын

    thank you it really helps❤

  • @changNoi1337
    @changNoi13375 ай бұрын

    Thanks from Germany!

  • @guyrandalf711
    @guyrandalf711Ай бұрын

    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?

  • @fidelotieno2409
    @fidelotieno24093 ай бұрын

    Thanks for your time sir💯💪

  • @arunsuthar4783
    @arunsuthar47838 ай бұрын

    We want full next js course with typescript

  • @olaleyeoyewunmi6978

    @olaleyeoyewunmi6978

    8 ай бұрын

    Yes please with mongodb

  • @shlomominkowicz65

    @shlomominkowicz65

    8 ай бұрын

    Yes please!! with postgres

  • @Salah-YT
    @Salah-YTАй бұрын

    thank u so much 😍👍

  • @mahmodsamir5110
    @mahmodsamir51109 күн бұрын

    thank you so much

  • @rollinsshadrack8768
    @rollinsshadrack87683 ай бұрын

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

  • @esdegan7176
    @esdegan71768 ай бұрын

    G R A P H C O O L V 3

  • @marktaylor865
    @marktaylor8657 күн бұрын

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

  • @jeanssmith5864
    @jeanssmith58648 ай бұрын

    ❤❤

  • @caseyspaulding
    @caseyspaulding8 ай бұрын

    Hell yes

  • @DontFollowZim
    @DontFollowZim8 ай бұрын

    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
    @kitebeachinnbeachinn28887 ай бұрын

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

  • @j_s_bxpert6160
    @j_s_bxpert61604 ай бұрын

    Thanks sir

  • @frankylopez4477
    @frankylopez44777 ай бұрын

    Thanks

  • @nisargjaiswal4264
    @nisargjaiswal42648 ай бұрын

    Awesome, now its time for Drizzle 🙃

  • @ShayansCodeCommunity
    @ShayansCodeCommunity8 ай бұрын

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

  • @ShayansCodeCommunity

    @ShayansCodeCommunity

    8 ай бұрын

    @@memberwhen22 Thanks sir 🙏👍

  • @melanatedthought7014
    @melanatedthought70148 ай бұрын

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

  • @olatuborafelix7875

    @olatuborafelix7875

    8 ай бұрын

    Most you swear 😅😅😅

  • @starlord7526

    @starlord7526

    7 ай бұрын

    Jesus be like: wtf, when did this happen

  • @_itsmeKHawaR
    @_itsmeKHawaR8 ай бұрын

    Make a course on iOS development.. 23:38

  • @MrLuckfinder
    @MrLuckfinder8 ай бұрын

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

  • @parkerrex
    @parkerrex8 ай бұрын

  • @mistart1633
    @mistart16336 ай бұрын

    Prisma !== Production is true

  • @PavanKatepalli-fb4ly
    @PavanKatepalli-fb4ly7 ай бұрын

    active record is still so much better

  • @Franck_Polla
    @Franck_PollaАй бұрын

    thank you very much

Келесі