Тёмный

Database Design 37 - 2NF (Second Normal Form of Database Normalization) 

Caleb Curry
Подписаться 627 тыс.
Просмотров 129 тыс.
50% 1

Start your software dev career - calcur.tech/dev-fundamentals 💯 FREE Courses (100+ hours) - calcur.tech/all-in-ones
🐍 Python Course - calcur.tech/python-courses
✅ Data Structures & Algorithms - calcur.tech/dsa-youtube
~~~~~~~~~~~~~~~ CONNECT ~~~~~~~~~~~~~~~
✉️ Newsletter - calcur.tech/newsletter
📸 Instagram - / calebcurry
🐦 Twitter - / calebcurry
🔗 LinkedIn - / calebcurry
▶️ Subscribe - calcur.tech/subscribe
👨🏻‍🎓 Courses - www.codebreakthrough.com
~~~~~~~~~~~~~~ SUPPORT ME ~~~~~~~~~~~~~~
↪ My Amazon Store - www.amazon.com/shop/calebcurry
🅿 Patreon - calcur.tech/patreon-calebcurry
🅖 GitHub Sponsors - github.com/sponsors/CalebCurry
Ⓟ Paypal - paypal.me/calcur
🅑 Bitcoin - 3HnF1SWTzo1dCU7RwFLhgk7SYiVfV37Pbq
🅔 Eth - 0x350139af84b60d075a3a0379716040b63f6D3853
📈 Buy Bitcoin - calcur.tech/crypto
Reserve the Ruby Steel crypto rewards card and get a $25 bonus (use affiliate code "Caleb") - calcur.tech/crypto

Наука

Опубликовано:

 

23 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 120   
@ivinvirus1271
@ivinvirus1271 7 лет назад
I wish lecturers would have a sense of humor and simplicity like you. There was a 2 hour lecture on 2NF, god knows what he said I didn't get a thing
@RubiixCat
@RubiixCat 5 лет назад
Some lecturers seem to love over-complicating the shit out of things that are actually relatively trivial.
@lavans06
@lavans06 5 лет назад
Then there are profs who read off their slide in a monotone voice lol
@perpetuaL524
@perpetuaL524 4 года назад
@orbitaldildo there is actual theory that a comp sci student is expected to know. while these videos are great for basic understanding, it nowhere near touches actual relational db design theory and solving normalization of data. For example, he lightly touched on data dependency in the video yet understanding that relationship is vital to understanding how data relates, how natural joining data is the reversibility operation for normalization. Or that the operation he was doing by creating a new table, and a bridge table was performing non-loss decomposition to two smaller degree relations via relational algebra projection. It may all sound like wordy bs but knowing terminology and the reasons behind it means you actually know the theory and can put it into practice. What he has done here is also muddy the water a bit because 2NF doesn't strictly require a bridge table(Associative entity), just the situation he created - and he did not clarify that.
@MohamedSalah-wu2mz
@MohamedSalah-wu2mz 4 месяца назад
You seems like you know shit or 2 about database, why are you here then?@@perpetuaL524
@mandishaw3896
@mandishaw3896 8 лет назад
I found your videos 45 minutes before a huge compsci midterm yesterday. Turns out half the exam was about normalization. Thanks for saving my grade!!!
@neer2890
@neer2890 5 лет назад
Dude!! You really concentrated on what is required. I mean the basic thing that needs to be known before going to remove the partial dependency. Salute to you brother, I was looking for this for a long time. Thanks a lot
@silverreyes7912
@silverreyes7912 6 лет назад
Great lectures. Now, where can I donate so this guy can get an eraser ?
@aksndnines
@aksndnines 6 лет назад
such a good change to hear someone teach this stuff in a humorous upbeat way. i feel like nearly every lecturer i have for database systems is boring as hell and monotone.
@visolaasrorova1101
@visolaasrorova1101 7 лет назад
hey! thank you for your humor, it makes easier to learn. With my deadlines, it is difficult to understand this stuff from rhe first time. But due to you, I did. many thanks))))
@winfredamazvidza3132
@winfredamazvidza3132 7 лет назад
I have gone through all my lectures, textbooks and other youtube videos, this is the first time I can actually safely say I now know whats going on! Thank you! :)
@a.hassanbarrie8439
@a.hassanbarrie8439 4 года назад
After reading and watching many videos, turns out yours was the only one that helped me to understand this concept . Thanks
@shreyasjoshi6140
@shreyasjoshi6140 7 лет назад
That pH joke destroyed me :')
@wisdom-for-life
@wisdom-for-life 2 года назад
What's up nerds! lol. Thanks for the database videos.. I'm 6 hours into this playlist.. It's been very helpful, thanks Caleb! I appreciate your sense of humor and openness - you be you!
@cccrystalized
@cccrystalized 7 лет назад
love love LOVE your videos. Very helpful and informative. Thank you Caleb!
@Snoopsy87
@Snoopsy87 4 года назад
One of the greatest undervalued teacher on RU-vid.
@nomenetasaili7339
@nomenetasaili7339 8 лет назад
lol!. You explained it better than my professor when I was in uni. Normalization was such a pain in the ass.
@emilyreed4586
@emilyreed4586 5 лет назад
Thank you tons! My textbook for my online course didn't give any real-life examples so this helps a ton.
@giatrilalla8517
@giatrilalla8517 6 лет назад
Love this vid! It’s easy to following.
@Bretaigne
@Bretaigne 5 лет назад
Thank you so much bro! This helped me finish my final project in no time.
@Laffen47
@Laffen47 9 лет назад
I am really struggling with this stuff, and this might be the only video that really haelped me, that ph joke though, jeeesuuus man. There are age restrictions on jokes like that.
@ahmedphiri9722
@ahmedphiri9722 6 лет назад
duuuuuuuuuuuuuude i was mad depressed until i heard that joke
@xxxBradTxxx
@xxxBradTxxx 3 года назад
The definition of a basic bitch: a Bitch who's pH is greater than 7.
@shaitangoetia8406
@shaitangoetia8406 9 лет назад
Dude you saved my life, you are awesome! Keep up the good work! :)
@evemary5133
@evemary5133 6 лет назад
Best video on normalization topic!
@BoxerDogs
@BoxerDogs 5 лет назад
Very good explanation. I read a few websites to try to understand partial dependency and I couldn't understand it. However your video made it very clear. Thank you for posting this.
@tannerbabcock4526
@tannerbabcock4526 5 лет назад
you have a gift. Not the hero MIS major deserve but the hero we need
@nurawadahismail02
@nurawadahismail02 6 лет назад
thank you for saving my life! but can i ask? what dependency for composite primary key?
@ahmadaziz1800
@ahmadaziz1800 8 лет назад
Thanks man! cool video.
@MiNdZblack
@MiNdZblack 6 лет назад
Dude you rock!
@cameionescu
@cameionescu 7 лет назад
so clear! thank you!
@emberafterglow4916
@emberafterglow4916 4 года назад
books to authors. artists to paintings. I got this. Dude, you are awesome!
@jefflong1799
@jefflong1799 4 года назад
What about just having a "credits table", that has a position ID, Author ID, and Book ID?
@UnlimitedSky00
@UnlimitedSky00 6 лет назад
man, i like your lectures! subscribed!!!
@jasperdiongco862
@jasperdiongco862 7 лет назад
Awesome great explanation. Thankyou!
@damagecontrol7
@damagecontrol7 Год назад
Thanks bro, finally got it.
@thamilselvir9913
@thamilselvir9913 5 лет назад
I like ur teaching and ur attitude and ur easily understand the concept
@WilsonSum
@WilsonSum Год назад
Just to make sure book_id and author_id were the composite key correct?
@borisjacimovic7390
@borisjacimovic7390 7 лет назад
This is great explanation. Thanks
@wyatthoffman3273
@wyatthoffman3273 4 года назад
Genius man! Thank you!
@omfgiamhot
@omfgiamhot 5 лет назад
You give me heart eyes. And you're a damn good teacher :)
@Maxwell-237
@Maxwell-237 5 лет назад
Love the time edits!
@tannmaykala262
@tannmaykala262 7 лет назад
the isbn number that you have put in the book_author table was correct or not ?
@codewithrafay5027
@codewithrafay5027 4 года назад
Greate man, you really made it easy..👍👍
@jeanbass926
@jeanbass926 5 лет назад
Can you please teach every subject lol, I might actually understand a lot more of my classes if you were the one teaching it. I love how you explain stuff! Best Best Best video I have seen in a long time on databases.
@camilleenolpe4687
@camilleenolpe4687 8 лет назад
do you have a video of normalizing a receipt ??..
@CtrlAltChinois
@CtrlAltChinois 6 лет назад
thank you, so well explained
@ink5473
@ink5473 8 лет назад
A huge help, THANK YOU
@andiyuan2359
@andiyuan2359 8 лет назад
Thanks for the video!
@jmarrima6232
@jmarrima6232 9 лет назад
Dude awesome lecture...you saved me :D...toomorow I have exam...thank u so much
@mitchellbender5497
@mitchellbender5497 4 года назад
Dude, you explain your videos so well. This advanced SQL course would have whopped my ass if it wasn't for your videos
@afzalozil9734
@afzalozil9734 4 года назад
yo i really went through so many to find this and now i know shit. thanks a lotttt Caleb
@abdulbah8514
@abdulbah8514 8 лет назад
thanks for the vid man
@shreyasjoshi6140
@shreyasjoshi6140 7 лет назад
I laughed harder than i should have at the pH joke
@georgebaker234
@georgebaker234 6 лет назад
best intro ever
@thisisMihji
@thisisMihji 6 лет назад
Caleb you are awesome dude
@asha_86
@asha_86 9 лет назад
Really great video..
@iansberg850
@iansberg850 7 лет назад
why not use surrogate key for "book_author"?
@abdulbasit5698
@abdulbasit5698 4 года назад
Thank u sir u gave me concept
@qiuhuaai6707
@qiuhuaai6707 5 лет назад
good job buddy
@stdrum-nb6qr
@stdrum-nb6qr 7 лет назад
where did you go to college? greets from serbia
@rampage241
@rampage241 9 лет назад
thank you!
@jessesanchez5294
@jessesanchez5294 5 лет назад
You changed the way you said Attributes yay!
@rodrickngonyoku5042
@rodrickngonyoku5042 4 года назад
wait...so book_id is a FK in which table exactly?...book table or book_author table?
@arkerim
@arkerim 9 лет назад
thanks man
@tredbailey
@tredbailey 6 лет назад
So can a table be in 1NF and 3NF without being in 2NF? Or does it has to go through 2NF to be in 3NF?
@codebreakthrough
@codebreakthrough 6 лет назад
It must be in 2NF, great question 🙂
@tredbailey
@tredbailey 6 лет назад
Thanks bro! You really helped grasp a missing piece that my professor couldn't tell me!
@zhen5537
@zhen5537 5 лет назад
does that mean the book-author has 2 primary key? book-id and author-id, or are they just foreign key? if they are foreign, then where is the primary key?
@manaligadre7809
@manaligadre7809 5 лет назад
It is a composite key. It's different than a foreign key. By definition: A composite key is a combination of two or more columns in a table that can be used to uniquely identify each row in the table when the columns are combined uniqueness is guaranteed, but when it is taken individually it does not guarantee uniqueness.
@ivanrosa4473
@ivanrosa4473 6 лет назад
Wanted to thank you for making this videos. Goddamn
@netizen1967
@netizen1967 8 лет назад
thank you
@vista413
@vista413 7 лет назад
One of nerds comes and says hi.
@elie3423
@elie3423 6 лет назад
Let him in, real quick...it's raining outside.
@gaga3963
@gaga3963 4 года назад
amazing
@General111100
@General111100 6 лет назад
subscribed!
@RafayKhanfy
@RafayKhanfy 7 лет назад
Thanks :)
@muhammedkurnasan116
@muhammedkurnasan116 4 года назад
take my like mate... you fucking deserved it.
@chaoschao9432
@chaoschao9432 7 лет назад
Thanks, the content in the video is correct, but not accurate. For 2NF, it need to remove all the partially dependency for candidate keys. Primary key is kind of candidate key, but they are not equal. Candidate keys are the ones, which can determine the tuple, they can be selected as primary key(s).
@lubokanev7436
@lubokanev7436 7 лет назад
This makes more sense. Else you could just make a surrogate key for the author_book table and leave the ISBN there, but that wouldn't be 2NF.
@johncaitlin2609
@johncaitlin2609 8 лет назад
is the ISBN not the Primary ID i dont understand it should be the primary id ]
@vincentfiestada
@vincentfiestada 8 лет назад
+John Caitlin In many cases it's helpful to use your own primary key. That's especially true if your database will last a long time. If, for example, they changed the ISBN system tomorrow (I don't know why, but theoretically they could), you'd be in trouble. For instance, you expected all ISBNs to be just numbers. If they changed that and said ISBNs can now have letters, you'd have to change your database.
@spicoli4217
@spicoli4217 5 лет назад
The ph level joke was a winner
@jefflong1799
@jefflong1799 4 года назад
This "partial" dependancy is still a little grey to me, or I'm over thinking it...
@celestinomba5913
@celestinomba5913 6 лет назад
Sometimes is better to learn from students than lecturers
@desthebest100
@desthebest100 5 лет назад
As soon as the video started I died laughing
@manaligadre7809
@manaligadre7809 5 лет назад
Isn't it violating 1NF? Book_Author (Composite key) is accepting multiple values..! Book_id and Author_id I know by definition: A composite key is a combination of two or more columns in a table that can be used to uniquely identify each row in the table when the columns are combined uniqueness is guaranteed, but when it is taken individually it does not guarantee uniqueness. But if we are using it in 2NF, how is it following atomicity rule of 1NF?
@codebreakthrough
@codebreakthrough 5 лет назад
Because the values are in two columns. We are not storing a an author id and a book id together in a string column.
@candle-likeghost9523
@candle-likeghost9523 3 года назад
Caleb: Is THAT make SENSE?! me: YYYYYEEAAAAAAAAAAAAAAHHHHHHHH!!!
@godmakoto1041
@godmakoto1041 5 лет назад
Your jokes are bad as my grades but they relax me gj bro
@UnknownUser-qq1od
@UnknownUser-qq1od 4 года назад
this man outright called me a nerd 😂😂😂 bruh how am i gonna focue now
@mystica3312
@mystica3312 5 лет назад
i was normal until this guy said 'what up,nerd?' awesome stuff. after watching it pretty clear about it :)
@Slimboyfat1979
@Slimboyfat1979 4 года назад
I come for the learning... I stay for the comedy
@JLibs123
@JLibs123 7 лет назад
you're a genius... thank you!
@mdshelahahmedrakib6613
@mdshelahahmedrakib6613 9 лет назад
+calebthevideomaker2 you made database design fun.
@lardosian
@lardosian 5 лет назад
But a book really only has one author, and an author can have many books so I would have thought it would be a one to many relationship?? Schema design can get confusing.
@codebreakthrough
@codebreakthrough 5 лет назад
A book can have many authors, so it would be many to many. :)
@lardosian
@lardosian 5 лет назад
@@codebreakthrough ok so you mean a single book being written by co authors then. But generally books usually have one author.
@codebreakthrough
@codebreakthrough 5 лет назад
Exactly what I mean yes. Generally it is one but not always
@Niko-zl5hn
@Niko-zl5hn 3 года назад
yo whats up Andy Samberg
@debayondharchowdhury2680
@debayondharchowdhury2680 5 лет назад
PH level.... LOL...I like this guy
@jlc4website
@jlc4website 7 лет назад
Not a big deal for the sake of this lecture, but real-world the ISBN likely would be the bookID primary key. Also liked the percent Hydroxy / phone number joke, though.
@matthewhector641
@matthewhector641 4 года назад
I’m sad that I laughed at “pH level”.
@liammoy5911
@liammoy5911 5 лет назад
I pay £40,000 for my lectures and learn more on a free video on RU-vid. Cheers.
@gabbym6192
@gabbym6192 9 лет назад
In a real world example the intermediary table you are using ("book_author") would not be practical
@codebreakthrough
@codebreakthrough 9 лет назад
Why not and what is your solution?
@gabbym6192
@gabbym6192 9 лет назад
I've just never personally seen any site that needed to order data of that nature, so to me the example you're using is just impractical. But the concept makes total sense and I agree with what you're saying otherwise. :) I don't have much of a solution other than to suggest a better example. Perhaps the example would have made more sense if the intermediary had been a library database that connected the two. So library_books and the columns would be book_id, author_id, library_id (which would have a relationship with a table for library information) Hope that helps. :)
@gwjones12
@gwjones12 9 лет назад
Hey Caleb, your example is excellent and a correct design for a bridge table. Perhaps showing a short list of example rows for each of the tables would help show how and why the first, second, third author are being listed as you say. BTW, I would have put the Book table on the left and author on the right since the bridge table is book_author ;)
@lrdavid22g
@lrdavid22g 8 лет назад
Kinda agree, would be better for the viewer for you not to have to explain the nature of the data. Simple examples would be best IMO. Something everyone might understand.
@codebreakthrough
@codebreakthrough 8 лет назад
For illustration purposes it should be authors_books because of the way I set up the tables. but I would have preferred if I flipped the tables around and made it book_authors. The way I illustrated the columns may confuse a beginner so I apologize for not explaining in the video. That format is common of ERD. Thanks for the recommended fixes. I'll keep them in mind for future videos.
@heliomoonwave
@heliomoonwave 6 лет назад
haha this is funny way to learn data
@derrickrimson9655
@derrickrimson9655 6 лет назад
yo wassup nerds
@Lyftic
@Lyftic 6 лет назад
YO WHAT'S UP NERDS, I AM A STUDENT
@BeardTech
@BeardTech 5 лет назад
NERDDSSS!!! (Yep...me)
@prkchpxprss
@prkchpxprss 4 года назад
AAAYYEEEEE Chalk sound!!! NOOOOOOoooooo
@BibleGeeek
@BibleGeeek 4 года назад
ph level... LOL
@jayant9151
@jayant9151 5 лет назад
Nerd.... why
@Johnny1864
@Johnny1864 5 лет назад
I know this comment is years later, but please don't use chalk boards anymore...
@filipkustudic419
@filipkustudic419 5 лет назад
You are so unprepared for the video :) , you can not think in video man. Just saying, i dont mean it in the bad way, just feedback.
Далее
Learn Database Normalization - 1NF, 2NF, 3NF, 4NF, 5NF
28:34
2DROTS vs WYLSACOM! КУБОК ФИФЕРОВ 1 ТУР
07:25
МЕГА ФОКУС С КАЛЬКУЛЯТОРОМ
00:33
Database Normalisation: Third Normal Form
8:30
Просмотров 154 тыс.
Database Design 23 - Superkey and Candidate Key
19:15
Normalization - 1NF, 2NF, 3NF and 4NF
19:02
Просмотров 2,2 млн
1st, 2nd and 3rd Normal Form (Database Normalisation)
11:42
Database Normalization 1NF 2NF 3NF
10:26
Просмотров 154 тыс.