Learn Prisma In 60 Minutes

  Рет қаралды 371,168

Web Dev Simplified

Web Dev Simplified

Күн бұрын

Prisma is an incredibly popular ORM and for good reason. It is feature rich, type safe, and built on modern JavaScript concepts. The only downside is it is quite complicated to learn at first which is where this video comes in. I will be teaching you everything you need to know to get up and running with Prisma in just 60 minutes.
Thank you Prisma for providing professional captions for this video!
📚 Materials/References:
How To Install Node.js Video: • Your First Node.js Web...
Prisma Documentation: www.prisma.io/docs/getting-st...
Async/Await Video: • JavaScript Async Await
Async/Await Article: blog.webdevsimplified.com/202...
MongoDB Crash Course Video: • MongoDB Crash Course
MongoDB Crash Course Article: blog.webdevsimplified.com/202...
Mongoose Crash Course Video: • Mongoose Crash Course ...
🌎 Find Me Here:
My Blog: blog.webdevsimplified.com
My Courses: courses.webdevsimplified.com
Patreon: / webdevsimplified
Twitter: / devsimplified
Discord: / discord
GitHub: github.com/WebDevSimplified
CodePen: codepen.io/WebDevSimplified
⏱️ Timestamps:
00:00 - Introduction
01:12 - Project Setup
02:35 - Prisma Setup
06:38 - Basic Prisma Model Setup
07:56 - Prisma Migration Basics
09:11 - Prisma Client Basics
14:10 - Datasources and Generators
15:12 - Model Fields
19:19 - Model Relationships
26:16 - Model Attributes
29:55 - Enums
32:40 - Client Create Operations
40:15 - Client Read Operations
45:11 - Advanced Filtering
49:28 - Relationship Filtering
52:07 - Client Update Operations
55:02 - Connect Existing Relationships
57:52 - Client Delete Operations
#Prisma #WDS #Database

Пікірлер: 407
@n3x404
@n3x404 Жыл бұрын
This guy has same haircut for years, like not even an hair goes in wrong direction 😂, love you bro tnx 💪❤️
@extremeweirdness1528
@extremeweirdness1528 9 ай бұрын
Fun fact I got confused between web dev cody and him and I thought he lost his hair in the present 😂.
@vikashviraj1232
@vikashviraj1232 8 ай бұрын
Fun fact: He use hair wigggg 😂
@Vietnamcamping89
@Vietnamcamping89 5 ай бұрын
He is used css bro 😅
@n3x404
@n3x404 5 ай бұрын
@@extremeweirdness1528 lmaooo
@n3x404
@n3x404 5 ай бұрын
@@vikashviraj1232 I’m gonna buy it 😂
@AliAliOxenFree
@AliAliOxenFree Жыл бұрын
This is an hour long video, but honestly there's like 6 hours of content here. You have done a fantastic job. Prisma is tuly amazing!
@t3dotgg
@t3dotgg Жыл бұрын
Yeah prisma's pretty cool Quick hot take - migrations kinda suck and `npx prisma db push` w/ a db branch model (like planetscale) is a way better dx IMO
@umoooo
@umoooo Жыл бұрын
its cool to see you here, I first learnt about prisma in your link shortener video. It was awesome!
@curiouslycory
@curiouslycory Жыл бұрын
Do you have any videos or can you recommend any docs regarding this? I'm kinda stuck on the whole migration thing. Dev migrations work great, but translating those changes to prod seems to be really unclear to me. Running deploy from vercel tells me that there's no changes and the error log says I should baseline. Ultimately I ended up changing my connection on my local machine to the prod database and resolving all of the migrations, but didn't seem like the correct way to do it.
@arlandmv4053
@arlandmv4053 Жыл бұрын
Hello, can you say why do they suck? I would like to know..
@psyferinc.3573
@psyferinc.3573 3 ай бұрын
i forgot where but i managed to create some scripts that have the migration and pushing set @@curiouslycory "prismaPush": "dotenv -e .env.local npx prisma db push ", "prismaMigrate": "dotenv -e .env.local npx prisma migrate ", "prismaStudio": "dotenv -e .env.local npx prisma studio" these are my scripts in my package.json file ( for npm run and i installed "dotenv": "^16.3.1", "dotenv-cli": "^7.3.0", one year too late but i feel your pain
@matzesox
@matzesox Жыл бұрын
Hey Kyle, great vid. One note though: In around 29:00 you create an index on email, but you already have the unique constraint, which will create an index for you (unique constraints are basically an index with extra functionality). So all that sorting or filtering will already use the index, and you just add duplicate second index on the same field.
@gabrielpedroza1346
@gabrielpedroza1346 Жыл бұрын
This couldn’t have been a better timing. There is a new stack called t3-stack which uses nextjs, typescript, tailwind and tRPC. I WOULD LOVE you to create a video on tRPC because it simplifies and removes a shit ton of backend code. It also removes the schema so no graphQL because typescript safely infers the types so all you need to do is call the backend function and you’re good to go
@nexxel
@nexxel Жыл бұрын
maintainer of create-t3-app here. would love if Kyle makes a video using tRPC!
@lukausalj7630
@lukausalj7630 Жыл бұрын
+1 for this
@outis99
@outis99 Жыл бұрын
Literally the reason I'm here and quite surpirsed this is the most upvoted comment lol, I just started playing around with it today and it is amazing! There's some new syntax in v10 which means most videos are outdated but it's not that different, would love a video from Kyle
@warsame2245
@warsame2245 Жыл бұрын
@@nexxel I doubt it, the creator of tRPC aka Theo made a video making fun of kyle teaching method. dude is sassy
@nexxel
@nexxel Жыл бұрын
@@warsame2245 Theo isn't the creator of tRPC lol.
@lukebonnici5627
@lukebonnici5627 Жыл бұрын
Thanks a bunch for this tutorial! It was a super crash course that got me up to speed. Keep doing what you're doing and all the best :)
@siddhantgupta6719
@siddhantgupta6719 Жыл бұрын
Hey Kyle! Thanks for the Great video. Just a recommendation: for nodejs tutorials, you can put the VS code terminal on the right side instead of bottom, so both code and output is clearly visible. Keep up the amazing work
@Alex_agamer
@Alex_agamer Жыл бұрын
I accidentally clicked on the notification but i learned what prisma is and this video is actually really useful to me Thank you
@nairanvac79
@nairanvac79 Жыл бұрын
I came down to the comments to say the same thing. I thought this was going to be a Figma tutorial, but this is way cooler.
@RishaBhandari
@RishaBhandari Жыл бұрын
Thank you for all the efforts that you put into creating such informative videos. It really helps a lot. Keep it up Kyle
@masuya9915
@masuya9915 Жыл бұрын
Such a fantastic job of teaching prisma, no useless sidetracks, to the point. This is gold. I would give it way more than one like if I can!
@dkras
@dkras Жыл бұрын
You can, use another account
@fadygamilmahrousmasoud5863
@fadygamilmahrousmasoud5863 Жыл бұрын
this is one of the best tutorials out there to learn Prisma if you have zero experience with prisma .. amazing tutorial thank you 🙂
@miscany
@miscany Жыл бұрын
Nice and thorough tutorial. The others ones kinda jumped in fast or implemented prisma into prebuilt projects. I've never seen it before, so it's nice to get a rundown on how everything works with configuration :)
@bmejia220
@bmejia220 Жыл бұрын
Kyle youre brilliant man. I love learning from you, you give great practical tips, and details! One of the best developers on youtube. Thank you Kyle!!!
@Patrick33456
@Patrick33456 Жыл бұрын
I don't often leave comments but this video (and many others) was extremely helpful and to the point. This is the perfect way to learn something like Prisma and I'm tremendously grateful to you. There's so many people putting out content like this but you're one of the best. You make everything super approachable and have a knack for going in depth without being overwhelming. You've got a gift, keep on doing your thing man!
@astkh4381
@astkh4381 Жыл бұрын
as i undertsand if you got for example one-to-many realtion you can connect models from both sides?You can make user and connect certain post or you can make post and connect your user?
@27sosite73
@27sosite73 11 ай бұрын
@@astkh4381 plz google it
@jaikushwaha1012
@jaikushwaha1012 3 ай бұрын
Hey Kyle, thankyou so much for making one of the most comprehensive guide on getting started with Prisma
@duke4279
@duke4279 7 ай бұрын
Awesome content as always, been following you for years, thanks again Kyle ;)
@ritavdas7570
@ritavdas7570 8 ай бұрын
Such a detailed yet concise video !
@frankylopez4477
@frankylopez4477 7 ай бұрын
Truly the best Prisma tutorial I could find. Always love your videos.
@nikhil182
@nikhil182 Жыл бұрын
This is pure gold! I want to use prisma for my personal portfolio website. This video really helps! Thank you Kyle✨
@moodyhamoudi
@moodyhamoudi Ай бұрын
respectfully why do you need a database for a portfolio site
@nikhil182
@nikhil182 Ай бұрын
@@moodyhamoudi Good question, I have blog page on my website and I'm storing the likes and views for each of the blog in a DB and displaying the same on the blog page. Additionally I've self hosted a web analytics tool - Umami where I'll also need a DB. I hope this answers you're question:)
@moodyhamoudi
@moodyhamoudi Ай бұрын
@@nikhil182 very cool, thank you
@ultragigachader
@ultragigachader Жыл бұрын
Now that is something I will use to setup my next project, thanks Kyle!
@anterpants
@anterpants Жыл бұрын
Oh nice, I started using Prisma recently and was wondering if there was a tutorial. Really glad I found one from you!
@kartikfire
@kartikfire Жыл бұрын
Wow! Amazing video! Looking forward for more typescript related tutorials!
@mSpinks01
@mSpinks01 Жыл бұрын
Great timing. I am just now learning Prisma and I feel this tutorial is beneficial to getting it off the floor.
@iamhelllover
@iamhelllover Жыл бұрын
I've recently started using prisma and I needed a tutorial about it. Thank you for this video
@AnnieTaylorChen
@AnnieTaylorChen Жыл бұрын
Tried this when it was its last version. Lots have changed since. I gotta check this out again, definitely in my to watch list. :)
@anishadhikari3690
@anishadhikari3690 Жыл бұрын
Great comprehensive tutorials. Thank you!
@LuisFelipe-td8qk
@LuisFelipe-td8qk Жыл бұрын
Hey Kyle, thanks for your awesome work! Really love your videos. I suggest that you do a video covering GraphQL/Apollo just like this one, it would be great!
@danielnavarrete8571
@danielnavarrete8571 Жыл бұрын
Great video!, literally everything I needed to complete my project.
@balaganesh3440
@balaganesh3440 Жыл бұрын
Thanks for this. It was extremely useful and massively cut down the up and running time!
@davidmogbeyiteren348
@davidmogbeyiteren348 9 ай бұрын
This is super awesome! Thanks a lot, Kyle 🚀🚀
@rachidb9624
@rachidb9624 Жыл бұрын
Very impressive tutorial man, thank you very much ! Watched it till the end.
@abramboutros7672
@abramboutros7672 Жыл бұрын
man your subjects are just the best, I LOVE THIS CHANNEL. !!
@splitpierre
@splitpierre Жыл бұрын
Great work thanks. Came here looking for some more in-depth/practical cases around using the prisma migrate tool. It'd be interesting to see a tutorial talking exclusively on handling migrations considering multiple environments [local,stage,production]. Keep up the great work!
@annismonadjem6901
@annismonadjem6901 Жыл бұрын
Kyle, Thank you this course is amazing.
@user-gf8no4es6m
@user-gf8no4es6m 29 күн бұрын
Very helpful - I usually space out when reading docs or listening to someone talking slowly but somehow you keep me awake lol.
@Ocdib
@Ocdib 9 ай бұрын
Extremely clear! Thank you!!!
@bikerd12
@bikerd12 8 ай бұрын
This is a great tutorial. Kyle, thank you so much.
@wusswuzz5818
@wusswuzz5818 Жыл бұрын
Other alternatives to switching around the one-to-one relationship is a) when deleting, delete the dependent (preference) table first then the main table b) in the dependent table (preference) on the relationship put a cascade delete. In this case only need to delete the user table and it will auto delete related entry in the preference table.
@j_s_bxpert6160
@j_s_bxpert6160 4 ай бұрын
If you want to learn prisma, this tutorial is the best, it covers all you need.
@VitorVelosoSA
@VitorVelosoSA 11 ай бұрын
Perfect video. Now everything is so clean for me. Thank you
@luisfilipeparente4786
@luisfilipeparente4786 Жыл бұрын
Hello Kyle, thank you for this great course, I would like to ask you if you think that solving the constraint on the field userPreference with a cascade all strategy it also a valid thing to do? thanks
@Qw4z1
@Qw4z1 Жыл бұрын
Dude! This is probably the best tutorial on any topic that I've ever seen on KZbin.
@astkh4381
@astkh4381 Жыл бұрын
as i undertsand if you got for example one-to-many realtion you can connect models from both sides?You can make user and connect certain post or you can make post and connect your user?
@josebladex
@josebladex 4 ай бұрын
i was trying to get a success one to one relation query for many days, and your video was the ligth to get it, thanks so much.
@edwarddelgado9654
@edwarddelgado9654 9 ай бұрын
Cool, glad to see you covering thing this.
@sefatanam
@sefatanam Жыл бұрын
A compact, mighty tutorial of prisma
@cyb3ristic
@cyb3ristic 9 ай бұрын
watched the entire video, great content 👍🏻
@mcoria74
@mcoria74 Жыл бұрын
Amazing, finally a tutorial well explained, thanks a lot, regards from México :)
@carltongordon
@carltongordon Жыл бұрын
every time i start a new tech you pop up with a gem OMG
@adimaralimuddin96
@adimaralimuddin96 Жыл бұрын
i will thank you from the start kyle! you're the man!
@DEV_XO
@DEV_XO Жыл бұрын
Amazing mate, as always!
@Crogoch16
@Crogoch16 8 ай бұрын
Damn bro! I can't handle that amount of quality 🔥
@sourenasahraian2055
@sourenasahraian2055 2 ай бұрын
Did anyone else notice that when he logged the generated raw queries by Prisma , no join was taking place between the related tables , rather, instead of the join , it generated two back to back select queries between the related tables which means Prsima must be joining them through it's query engine as opposed to delegating the joins to the database engine in the application layer, this could have serious performance ramifications.
@scalitics
@scalitics Жыл бұрын
Thanks to your video I was able to create a complex database when I have never written an SQL line in my life. Thank you so much for this video, Prisma is amazing!
@MaggieAkinsulire
@MaggieAkinsulire 11 ай бұрын
You really should learn SQL though, at least just the basics. All of this would make so much more sense.
@ClickmeBrisbane
@ClickmeBrisbane Жыл бұрын
Awesome video, i also enjoyed your graphql video from couple years ago. I would love to see a video of graphql and prisma working together.
@tw04
@tw04 Жыл бұрын
How did you know I'm just about to use Prisma in my new Team project?? Thank you always man
@yasserhy
@yasserhy Жыл бұрын
Amazing course as always. Following you was the best decision I made a while back :) .. By the way, can't we get a copy of your course summary? It will really help as review notes :)
@akashdevgan
@akashdevgan Жыл бұрын
Great tutorial!!! What is your process for making long-form content?
@yomwoldemichael451
@yomwoldemichael451 Жыл бұрын
such a great video! I come back to this a lot
@xenyens
@xenyens 6 ай бұрын
Thank you for the update. I appreciate your time in this.
@ivandynysiuk4341
@ivandynysiuk4341 Ай бұрын
Awesome explanation! Thanks man 😎
@donmikkodanm.olmillo8154
@donmikkodanm.olmillo8154 Жыл бұрын
Thank you so much for this tutorial! you're a lifesaver
@paei4906
@paei4906 Жыл бұрын
your explanations are the best, thank you for your work
@tadeuszjiwu255
@tadeuszjiwu255 Жыл бұрын
Great work Kyle, thank You!
@bandinopla
@bandinopla Жыл бұрын
34:16 you can also Restart the Typescript server using the command palette
@danielpark399
@danielpark399 Жыл бұрын
beautiful tutorial! it helped me a lot! thank you very much
@w1lkns
@w1lkns 9 ай бұрын
Thanks so much for this!
@shaki7888
@shaki7888 Жыл бұрын
Another great tutorial, thank you!
@ashutoshsingh8867
@ashutoshsingh8867 Жыл бұрын
Awesome man. AWS amplify backend setup is also doing the same stuff like prisma does for us👍
@heguer87
@heguer87 Жыл бұрын
Thanks for the effort and making our lives a bit easier!😁
@davelag7838
@davelag7838 Жыл бұрын
awesome video!!, very well explained, thank you so much for sharing this info, I learned a lot Cheers from Central America
@TimKariuki
@TimKariuki Жыл бұрын
Very comprehensive Prisma crash course very well delivered.
@NilanjanH
@NilanjanH 2 ай бұрын
Bravo! Thanks for explaining Prisma from scratch ....🎉🌟😊
@tekoh
@tekoh Жыл бұрын
awesome video man you’re an amazing teacher. any chance we could get something similar for docker?
@parnasmi
@parnasmi Жыл бұрын
Great tutorial to learn Prisma. Thank you!
@bxlbjorn
@bxlbjorn Жыл бұрын
Wow, was about to embark with Mongoose, but after seeing this, and coming from SQL db experience, this is the way forward. Thanks Kyle!
@learner8084
@learner8084 8 ай бұрын
Great Great Video !!! Love it !!! 💗
@anatholekaringanire7649
@anatholekaringanire7649 9 ай бұрын
Much more helpful, you saved me for this contetiful tutorial.
@aeronwolfe7072
@aeronwolfe7072 Жыл бұрын
awesome video! thank you so much for this information!!! good job! love it.
@user-it4gk4en6u
@user-it4gk4en6u Жыл бұрын
this tutorial is very useful for me !! big thanks to you !!!
@lexsemenenko7044
@lexsemenenko7044 Жыл бұрын
A gem video! Very concise. Is it ready to replace Mongoose for MongoDB?
@YOitsBA
@YOitsBA Жыл бұрын
I loved this tutorial, one thing I didn't understand is why you reconfigured the user preferences so they'd delete. Does Prisma not have a modifier for cascading?
@brown-programmer
@brown-programmer 5 ай бұрын
Thanks for the great video!!!! I was able to do a personal project with the help of this video.
@ryanyoung1925
@ryanyoung1925 10 ай бұрын
Kyle, you always do the best!
@rahatsshowcase8614
@rahatsshowcase8614 Жыл бұрын
miniDocumentation of prisma! If you go through its time stamps ! And use which you need if you forget! Superb❤❤
@sajibahmed872
@sajibahmed872 8 ай бұрын
Thank you, This is really awesome
@sicro1000
@sicro1000 Жыл бұрын
What an excellent course, thank you 👍
@cone2571
@cone2571 Жыл бұрын
Svaka cast na videu, nadam se da ce svima biti jasno kako prismu koristiti, kao sto je meni jasno
@ignaciomartinezavila5693
@ignaciomartinezavila5693 2 ай бұрын
Incredible! What a great video. Could you please explain the integration with Graphql?
@workflowinmind
@workflowinmind Жыл бұрын
A deep prisma tutorial by Kyle?? Yes please
@mustafa-ahmed-dev
@mustafa-ahmed-dev Жыл бұрын
Thank you so much. After I had watched this tutorial, I used Prisma in my graduation project.
@benyaminyakobi3652
@benyaminyakobi3652 Жыл бұрын
Hi Kyle. Thank you once again!
@andrewgulin5634
@andrewgulin5634 10 күн бұрын
Thank you, this was very helpful
@hk_build
@hk_build Жыл бұрын
Thanks for great content!! Can you make a video on micro front end on module federation with react???
@Lenny_Malcolm0
@Lenny_Malcolm0 3 ай бұрын
All in 60 minutes🤯... Great tutorial💯❤
@davidwashington7293
@davidwashington7293 2 ай бұрын
Kyle, you are awesome! Thank you for all the videos you provide for us. Does anyone know where Kyle's notes are for this video? I looked on Github and couldn't find them. Thanks....
@theisoj
@theisoj Жыл бұрын
Prisma looks cool! Thanks Kyle!
@alinawaz4034
@alinawaz4034 Жыл бұрын
Awesome video, this is what was looking for 💕💘 I have a request, can you make a video on GUN JS DB like this. It is amazing free pear-to-pear DB and people will love it.
@not_a_human_being
@not_a_human_being 3 ай бұрын
Keep making great accessible content!
@sunilanthony17
@sunilanthony17 3 ай бұрын
god dam, this is amazing. The documentation for Prisma is fantastic too.
@mikhalpalych
@mikhalpalych 5 ай бұрын
The only comprehensive one, nice, thank you dude
@mikhalpalych
@mikhalpalych 5 ай бұрын
Oh, but when i got to enums part, i didn't actually get, what enums are translated into
Prisma Crash Course
36:41
Traversy Media
Рет қаралды 54 М.
Top 6 React Hook Mistakes Beginners Make
21:18
Web Dev Simplified
Рет қаралды 556 М.
The World's Fastest Cleaners
00:35
MrBeast
Рет қаралды 142 МЛН
Migration Lesson: Don't Use Prisma | Prime Reacts
29:16
ThePrimeTime
Рет қаралды 141 М.
Learn Zod In 30 Minutes
31:03
Web Dev Simplified
Рет қаралды 128 М.
How This Test Saved Kent’s Site
7:04
Web Dev Simplified
Рет қаралды 54 М.
10 common mistakes with the Next.js App Router
20:37
Vercel
Рет қаралды 167 М.
Learn Next.js 13 With This One Project
29:42
Web Dev Simplified
Рет қаралды 364 М.
Learn tRPC In 45 Minutes
45:35
Web Dev Simplified
Рет қаралды 98 М.
the new PS4 jailbreak is sort of hilarious
12:21
Low Level Learning
Рет қаралды 54 М.
Is Drizzle Really Better Than Prisma?
20:15
Web Dev Simplified
Рет қаралды 64 М.
How To Actually Get Hired In 2024
10:43
Web Dev Simplified
Рет қаралды 186 М.
The World's Fastest Cleaners
00:35
MrBeast
Рет қаралды 142 МЛН