Prisma Crash Course

  Рет қаралды 52,601

Traversy Media

Traversy Media

Күн бұрын

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

Пікірлер: 80
@PrismaData
@PrismaData 7 ай бұрын
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 7 ай бұрын
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 7 ай бұрын
@@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 7 ай бұрын
@@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 7 ай бұрын
@@arogueotakuradio silence… 😢
@nikolasburk
@nikolasburk 7 ай бұрын
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 7 ай бұрын
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! ✌🏻
@MarkusEicher70
@MarkusEicher70 7 ай бұрын
Thank you, Brad. Short, concise and informative. The usual high standard we all are enjoying from you. 🤛
@mehrdara6545
@mehrdara6545 7 ай бұрын
Thank you Brad every time I want to learn something new you are my first goto youtube channel
@ricardocnn
@ricardocnn 7 ай бұрын
it's so much simple and more straightforward than firebase functions. It's Amazing!
@shlomominkowicz65
@shlomominkowicz65 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 :)
@ricardocnn
@ricardocnn 7 ай бұрын
Wow man, I'm studying PostgreSQL, it was exactly what I was going to start studying to implement in my apps. Thanks!
@cloudagnostic
@cloudagnostic 7 ай бұрын
There’s a reason you have 2 million subs! Very informative and top tier tutorial. Thanks Brad!
@gyongxichen
@gyongxichen 2 ай бұрын
you damn right!
@kajalmishra6895
@kajalmishra6895 7 ай бұрын
Wow❕ Brad you read my mind. This is exactly what I need for my project.
@johndanieldecastro7024
@johndanieldecastro7024 7 ай бұрын
Thank you Brad! You're carrying my dev journey
@binayakgshankar9188
@binayakgshankar9188 6 ай бұрын
Thanks a ton for this. following your videos since 2016, learned a lot from you.
@ramioooz
@ramioooz 6 ай бұрын
Thank you very much for sharing such high-quality educational material. Your lessons are always very clear and straightforward. Thank you 🌻
@rodrigojulianmartin7092
@rodrigojulianmartin7092 7 ай бұрын
Thanks, this video was great and straight to the point! Super effective. I will subscribe and check other videos from you!
@SandeepSingh-ye5fh
@SandeepSingh-ye5fh 7 ай бұрын
Thanks for sharing valuable videos ❤
@talleyrand9530
@talleyrand9530 4 ай бұрын
Good job Brad. You add accessibility to new tech and that’s awesome.
@r-i-ch
@r-i-ch 7 ай бұрын
Thanks Brad! I'd love to see this with Drizzle.
@theophilus494
@theophilus494 7 ай бұрын
see boss! you are a blessing.. thanks so much!!!
@aliissa1058
@aliissa1058 7 ай бұрын
You are the best! Thank you
@genovo
@genovo 7 ай бұрын
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.
@matthewclarke1926
@matthewclarke1926 7 ай бұрын
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 7 ай бұрын
Have you tried Blazor? The sql can be generated code first (from the models). .Net 8 sounds good.
@claude3957
@claude3957 4 ай бұрын
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 4 ай бұрын
@@claude3957 React will fall to Vanilla JS.
@GilAguilar
@GilAguilar 7 ай бұрын
Sweet thanks for sharing Brad 🤟💙☕️
@LaminarRainbow
@LaminarRainbow 2 ай бұрын
Yes! Traversy Media did a Prisma video! Thank you!!
@mahmudbakale8190
@mahmudbakale8190 7 ай бұрын
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
@aburaihan-py4vi
@aburaihan-py4vi 7 ай бұрын
Excellent!
@user-uy4qp1qx3n
@user-uy4qp1qx3n 4 ай бұрын
Awesome!. Thanks for making videos like this. Really enjoy your videos. Please, make more videos like this!.
@ronydas5474
@ronydas5474 7 ай бұрын
Interesting ❤
@ramonmaximiliano3557
@ramonmaximiliano3557 Ай бұрын
as usual, you are the best!
@irfansaeedkhan7242
@irfansaeedkhan7242 Ай бұрын
thank you its great for getting started
@Odidi_Bee6ix
@Odidi_Bee6ix 4 ай бұрын
Spot on. Thanks buddy
@Omar-Tood
@Omar-Tood 7 ай бұрын
Thanks brad❤
@ar-swe
@ar-swe 7 ай бұрын
really awesome love you
@RABWA333
@RABWA333 4 ай бұрын
Great effort, thanks alot
@philippearras8154
@philippearras8154 7 ай бұрын
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.
@gyongxichen
@gyongxichen 2 ай бұрын
thank you it really helps❤
@changNoi1337
@changNoi1337 5 ай бұрын
Thanks from Germany!
@fidelotieno2409
@fidelotieno2409 2 ай бұрын
Thanks for your time sir💯💪
@alikisang827
@alikisang827 7 ай бұрын
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 7 ай бұрын
Can you employ me in your company 😁, I'm also Kenyan
@MelodyBeats.
@MelodyBeats. 7 ай бұрын
Hindi sayo hindi akin KENYA
@feelchi1star
@feelchi1star 7 ай бұрын
This is really educative. Can the models in schema.prisma be split into separate files to enhance code readability? Just mongoose ORM.
@Blacken997
@Blacken997 7 ай бұрын
How do you choose between using Prisma and Knex?
@Salah-YT
@Salah-YT Ай бұрын
thank u so much 😍👍
@amn3siacx
@amn3siacx 7 ай бұрын
What VScode Theme is that, I really like it, share your setup pls, thanks!
@Grishopping
@Grishopping 7 ай бұрын
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
@Lavinvlog
@Lavinvlog 7 ай бұрын
Please make a tutorial on remix
@jeanssmith5864
@jeanssmith5864 7 ай бұрын
❤❤
@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?
@caseyspaulding
@caseyspaulding 7 ай бұрын
Hell yes
@rollinsshadrack8768
@rollinsshadrack8768 2 ай бұрын
This is amaizing. Can you make one on how to use prisma with Knexjs?
@j_s_bxpert6160
@j_s_bxpert6160 3 ай бұрын
Thanks sir
@arunsuthar4783
@arunsuthar4783 7 ай бұрын
We want full next js course with typescript
@olaleyeoyewunmi6978
@olaleyeoyewunmi6978 7 ай бұрын
Yes please with mongodb
@shlomominkowicz65
@shlomominkowicz65 7 ай бұрын
Yes please!! with postgres
@frankylopez4477
@frankylopez4477 6 ай бұрын
Thanks
@umitcelik5508
@umitcelik5508 7 ай бұрын
Prisma will save us from sequelize. Finally!
@kitebeachinnbeachinn2888
@kitebeachinnbeachinn2888 7 ай бұрын
Theres a competitor called: DrizzleORM please take a look as well.
@esdegan7176
@esdegan7176 7 ай бұрын
G R A P H C O O L V 3
@DontFollowZim
@DontFollowZim 7 ай бұрын
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?
@nisargjaiswal4264
@nisargjaiswal4264 7 ай бұрын
Awesome, now its time for Drizzle 🙃
@ShayansCodeCommunity
@ShayansCodeCommunity 7 ай бұрын
If possible, develop a crash course on Laravel Blade and some useful UI libraries (not Breeze), sir please 🥺🙏.
@ShayansCodeCommunity
@ShayansCodeCommunity 7 ай бұрын
@@memberwhen22 Thanks sir 🙏👍
@khawarabbasi9013
@khawarabbasi9013 7 ай бұрын
Make a course on iOS development.. 23:38
@melanatedthought7014
@melanatedthought7014 7 ай бұрын
I swear to the lord christ, I was looking for a crash course on Prisma...can you do one for dribble
@olatuborafelix7875
@olatuborafelix7875 7 ай бұрын
Most you swear 😅😅😅
@starlord7526
@starlord7526 7 ай бұрын
Jesus be like: wtf, when did this happen
@mistart1633
@mistart1633 6 ай бұрын
Prisma !== Production is true
@parkerrex
@parkerrex 7 ай бұрын
@PavanKatepalli-fb4ly
@PavanKatepalli-fb4ly 6 ай бұрын
active record is still so much better
@MrLuckfinder
@MrLuckfinder 7 ай бұрын
Hello my friend! Why do you forbid access to your site for users from Russia? Does any russian offend you?
@Franck_Polla
@Franck_Polla 27 күн бұрын
thank you very much
Bun Crash Course | JavaScript Runtime, Bundler & Transpiler
40:19
Traversy Media
Рет қаралды 63 М.
Learn Prisma In 60 Minutes
59:25
Web Dev Simplified
Рет қаралды 365 М.
【獨生子的日常】让小奶猫也体验一把鬼打墙#小奶喵 #铲屎官的乐趣
00:12
“獨生子的日常”YouTube官方頻道
Рет қаралды 46 МЛН
Суд над Бишимбаевым. 2 мая | ОНЛАЙН
7:14:30
AKIpress news
Рет қаралды 613 М.
когда одна дома // EVA mash
00:51
EVA mash
Рет қаралды 6 МЛН
АВДА КЕДАВРАААААА😂
00:11
Romanov BY
Рет қаралды 8 МЛН
I tried 8 different Postgres ORMs
9:46
Beyond Fireship
Рет қаралды 374 М.
15 Web Developer-Related Career Paths
25:19
Traversy Media
Рет қаралды 121 М.
Learn Drizzle ORM in 13 mins (crash course)
14:00
Neon
Рет қаралды 16 М.
Are You Too Dumb To Code? A Chat About Imposter Syndrome
7:08
Traversy Media
Рет қаралды 60 М.
Migration Lesson: Don't Use Prisma | Prime Reacts
29:16
ThePrimeTime
Рет қаралды 140 М.
Using MongoDB with Prisma
11:58
Prisma
Рет қаралды 52 М.
TypeScript Crash Course
52:27
Traversy Media
Рет қаралды 576 М.
You might not need useEffect() ...
21:45
Academind
Рет қаралды 123 М.
Prisma in 100 Seconds
2:34
Fireship
Рет қаралды 558 М.
All New Atlas | Boston Dynamics
0:40
Boston Dynamics
Рет қаралды 5 МЛН
Samsung or iPhone
0:19
rishton_vines😇
Рет қаралды 223 М.
План хакера 🤯 #shorts #фильмы
0:59
BruuHub
Рет қаралды 995 М.
Эволюция телефонов!
0:30
ТРЕНДИ ШОРТС
Рет қаралды 1,7 МЛН