Database Normalisation: Second Normal Form

  Рет қаралды 161,639

Computer Science Lessons

Computer Science Lessons

Күн бұрын

This video is part of a series about database normalisation. It explains how to transform a database, which is already in first normal form, into second normal form by working through an example. It covers the criteria for the second normal form including ensuring that a relation, that is a table, does not contain any partial dependencies on the primary key. The video explains what is meant by a functional dependency and a partial dependency.

Пікірлер
@deathnightpwnage123
@deathnightpwnage123 5 жыл бұрын
This channel is quite underrated. Thank you for publishing these videos!
@TheZliKadi
@TheZliKadi 4 жыл бұрын
i've watched several normalisation tutorials, also listened to a college course, and this is the best material i've found! you could say - normalisation for dummies :) TY
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
Very kind of you to say so. :)KD
@firepower01
@firepower01 4 ай бұрын
These are hands down the best computer science videos on the internet... Thank you so much for helping me get through my degree over the years!
@jeffreytello589
@jeffreytello589 5 жыл бұрын
best explanation of normalization on the internet! thank you
@ComputerScienceLessons
@ComputerScienceLessons 5 жыл бұрын
Thanks - I appreciate the comment. :)KD
@3NESHKUMAR
@3NESHKUMAR 4 жыл бұрын
@@ComputerScienceLessons Really, Best Explanation ...Great work
@Combatechist
@Combatechist 4 жыл бұрын
It's good to know there are people who have a clear mental thought process in this industry.
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
TY :)KD
@jamie-leevellem91
@jamie-leevellem91 Жыл бұрын
This is by far the best explanation there is out there!!!!! Thank you
@ComputerScienceLessons
@ComputerScienceLessons Жыл бұрын
You are very welcome, and thank you :)KD
@user-gs2fw4nu7t
@user-gs2fw4nu7t 4 жыл бұрын
Thank you so much for this series! You're much better at explaining database normalisation than our university professors.
@SiddiqNx
@SiddiqNx 5 жыл бұрын
This is the clearest video I have seen on this topic. Your way of teaching is really amazing! Clear, concise, comprehensible and to the point. Keep up the work. Please don't ever stop making such high quality videos. :) Thanks.
@dhkim5674
@dhkim5674 3 жыл бұрын
All the lingo about partial dependencies, prime and non prime attributes had me confused but you were able to explain it in such a clear and concise manner! Much appreciated, and definitely helped me understand this part of my DBMS course much better!
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
Delighted to help. I agree, technobabble often makes things seem more complicated than they really are. :)KD
@mgray999
@mgray999 5 жыл бұрын
You have a very professional voice, and I like how you use examples and problems that would occur in the field. So grateful for this! I was getting horribly flustered and depressed from this week's work because the book and prof aren't doing the best job. Thank you.
@ComputerScienceLessons
@ComputerScienceLessons 5 жыл бұрын
You are most welcome. Thanks for complement. Hang in there. The best way to get to know databases is to build a few. Nice horse BTW :)KD
@abu-bakrmohamed1707
@abu-bakrmohamed1707 Жыл бұрын
literally the best normalization tutorial i have ever watched !, thank you so much 💖
@ComputerScienceLessons
@ComputerScienceLessons Жыл бұрын
Thank You :)KD
@iyasuwalalign2860
@iyasuwalalign2860 8 ай бұрын
ur voice ,logicallity of teaching is just perfect
@bobbyw1074
@bobbyw1074 4 жыл бұрын
Thank you. You are the only one that can explain it simply.
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
You are very welcome! :)KD
@James-mv4ge
@James-mv4ge 5 жыл бұрын
This was one of if not the most helpful videos I found on normalisation.
@ComputerScienceLessons
@ComputerScienceLessons 5 жыл бұрын
Thanks for the comment :) KD
@fadygamilmahrousmasoud5863
@fadygamilmahrousmasoud5863 3 жыл бұрын
for sure it's the best explanation ever for normalization on youtube, thanks
@NixTheG0at
@NixTheG0at 5 жыл бұрын
thanks man, after a 3 , 4 days of researching finally i understand 2nf from this video, you are my database hero bro :X
@ComputerScienceLessons
@ComputerScienceLessons 5 жыл бұрын
Glad to help :) KD
@Billbillbillhahagdvdve
@Billbillbillhahagdvdve 4 жыл бұрын
These vids are great. Super clear and easy to understand unlike so many others !!
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
Thank you for the lovely comment :)KD
@Jobe-bj2pq
@Jobe-bj2pq Жыл бұрын
I struggled with 2NF all day in my class but this video had the best explanation yet! Thank you so much!
@mikekirby5592
@mikekirby5592 7 ай бұрын
Superior treatment of normalization; great teacher
@GamerBoyRobby
@GamerBoyRobby 3 жыл бұрын
I am in my final year of my degree - for 5 years I have struggled with 2nd normal form but your description that the table should only contain that which is unique to the primary key has helped my understanding massively! Thank you!
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
You are most welcome. Sometimes it takes only a tiny idea to switch the lightbulb on. 💡 :)KD
@GamerBoyRobby
@GamerBoyRobby 3 жыл бұрын
@@ComputerScienceLessons I have always been good at starting with 1NF and getting to 3NF. Never understood why 2NF was so hard for me to understand lol. Once again, thank you 😊
@katzwhacky
@katzwhacky 5 жыл бұрын
Lifesaver! Database Systems textbook is too dense! Thanks for helping my grade! Subscribed!
@SinuraVinudhiWahalathanthri
@SinuraVinudhiWahalathanthri 2 жыл бұрын
Thank you so much for this valuable video. I had a big issue about the 2nd normal form i watched about 20 videos but nothing was clear as this was sir. Thank you so much
@ComputerScienceLessons
@ComputerScienceLessons 2 жыл бұрын
You are most welcome. Glad to help :)KD
@AayushBartaula
@AayushBartaula 4 жыл бұрын
This type of computerised video are very informative and to the point but i don't know why youtube algorithm don't make it popular
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
Thanks for the complement. I do need to work on my visibility. :)KD
@JohnDoe-cn9lt
@JohnDoe-cn9lt 5 жыл бұрын
This is the best explanation of normalization ever!!!
@ComputerScienceLessons
@ComputerScienceLessons 5 жыл бұрын
Comments like that keep me going. Thanks a million. :) KD
@St1ckl3r
@St1ckl3r 3 жыл бұрын
Extraordinary teaching skills, well done!
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
Thank you. You're very kind :)KD
@manilakid3
@manilakid3 3 жыл бұрын
Well done. You have command on the subject and know how to explain it in clear simple English.
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
Thank you :)KD
@derekmiddlemiss6358
@derekmiddlemiss6358 Жыл бұрын
Excellent, you're a great teacher! Thanks
@ComputerScienceLessons
@ComputerScienceLessons Жыл бұрын
Thank you. That's lovely to hear :)KD
@Mike-vj8do
@Mike-vj8do Жыл бұрын
best normalisation video on youtube
@ComputerScienceLessons
@ComputerScienceLessons Жыл бұрын
Thank you :)KD
@wdub1362
@wdub1362 4 жыл бұрын
Thank you for being clear and concise. Examples were great
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
You're very welcome. Thanks for commenting :)KD
@bharathisundarvelu1569
@bharathisundarvelu1569 3 жыл бұрын
Fantastic Explanation ... Just fantasticcc...
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
Thank you :)KD
@selinklnc4903
@selinklnc4903 Жыл бұрын
thank you it was the best explanation for normalisation
@ComputerScienceLessons
@ComputerScienceLessons Жыл бұрын
Thank you. You're very kind :)KD
@tormund_gb1908
@tormund_gb1908 3 жыл бұрын
Thank you so much for this video. You made a topic that seems so complex very simple to understand.
@kola3880
@kola3880 Жыл бұрын
thank you so much for actually giving an understandable explanation thnak you!!!!
@ComputerScienceLessons
@ComputerScienceLessons Жыл бұрын
You are most welcome :)KD
@ahcmadtaufiqbinchairilanwa3904
@ahcmadtaufiqbinchairilanwa3904 2 жыл бұрын
I have watched other video about interpretation Second Normal Form and this video very helpfully thanks
@dastanpc874
@dastanpc874 5 жыл бұрын
thanks mate! a life savior you are
@ComputerScienceLessons
@ComputerScienceLessons 5 жыл бұрын
Really appreciate the comment. :)KD
@منصةروادالتكنولوجيا
@منصةروادالتكنولوجيا 5 жыл бұрын
من اليمن. استمر. From Yemen. Continue
@ComputerScienceLessons
@ComputerScienceLessons 5 жыл бұрын
I will. Thanks for the comment :)KD
@youssefnov9037
@youssefnov9037 4 жыл бұрын
ممكن مساعده بخصوص هذا الدرس اكون شاكرتلك ضروري
@saumyasingh7216
@saumyasingh7216 2 жыл бұрын
Thank you for explaining it so nicely!
@ComputerScienceLessons
@ComputerScienceLessons 2 жыл бұрын
You're most welcome :)KD
@tombaxter716
@tombaxter716 3 жыл бұрын
I love you you’ve made my day
@artistryartistry7239
@artistryartistry7239 2 жыл бұрын
6:17 hi, great video, but when it comes to Foreign key names, might be less confusing if you change ID to studentID so there's less confusion about whether the ID column is a foreign or primary key for those not familiar with the concept.
@ComputerScienceLessons
@ComputerScienceLessons 2 жыл бұрын
Good point. Thanks :)KD
@artistryartistry7239
@artistryartistry7239 2 жыл бұрын
@@ComputerScienceLessons Sure thing mate :) This video is so good I keep coming back to it for a review, even after having previously grasped the concepts.
@paurushgargtube
@paurushgargtube 3 жыл бұрын
Best Explanation
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
Thank you :)KD
@kshatryakopf
@kshatryakopf Жыл бұрын
This video is a gem, thank you!
@ComputerScienceLessons
@ComputerScienceLessons Жыл бұрын
You're welcome. And thank you :)KD
@rufina305
@rufina305 3 жыл бұрын
Thank you so much for the clear explanation
@gudisa-1
@gudisa-1 3 жыл бұрын
WELL DONE!
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
TY :)KD
@cloudsandRain01
@cloudsandRain01 4 жыл бұрын
VERY helpful, thank you loads !!
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
You're welcome :)KD
@NilakshMalpotra
@NilakshMalpotra 3 жыл бұрын
amazing as always :) Thank you so much
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
Thank you. You are very welcome :)KD
@miguelamezcua4629
@miguelamezcua4629 4 жыл бұрын
Every well made! Thank you
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
You are welcome. :)KD
@liquidation22
@liquidation22 4 жыл бұрын
thanks interwebs! good class...well explained
@youssefnov9037
@youssefnov9037 4 жыл бұрын
Can you help me?? 😭😭
@liquidation22
@liquidation22 4 жыл бұрын
@@youssefnov9037 what do you need help with?
@youssefnov9037
@youssefnov9037 4 жыл бұрын
@@liquidation22 I have a question of this type, but I am not sure of the answer. Do you have an Insta account or a number or an email to communicate because I need to make sure
@liquidation22
@liquidation22 4 жыл бұрын
Wade.byker@gmail.com
@shivangraina9698
@shivangraina9698 4 жыл бұрын
Wow superb explanation
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
Thank you :)KD
@ahmedziyad2731
@ahmedziyad2731 Жыл бұрын
Thank you so much 🙏❤
@shreenthasleem2820
@shreenthasleem2820 Жыл бұрын
It took 5 years till I see ur video to understand
@ComputerScienceLessons
@ComputerScienceLessons Жыл бұрын
Glad to help :)KD
@mikemihay
@mikemihay 5 жыл бұрын
Thank you! Keep uploading, You got a new subscriber!
@parthshisode6125
@parthshisode6125 4 жыл бұрын
fantastic tutorial :D
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
Thanks for the lovely comment :)KD
@JonathanHobbe
@JonathanHobbe 4 жыл бұрын
Thanks so much!!!
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
You're welcome :)KD
@abdiwahabadan1817
@abdiwahabadan1817 5 жыл бұрын
thank you so much brother
@ComputerScienceLessons
@ComputerScienceLessons 5 жыл бұрын
You are most welcome. :)KD
@ridajaafar863
@ridajaafar863 4 жыл бұрын
Thank you❤❤
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
Most welcome :)KD ❤
@meritonqafleshi7416
@meritonqafleshi7416 3 жыл бұрын
Thenk you bro
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
You're welcome :)KD
@fluorescent_axolotl
@fluorescent_axolotl 4 жыл бұрын
thank you!
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
You're welcome :)KD
@icis27
@icis27 4 жыл бұрын
Just clarifying my understanding, around the 3:30 mark when we're talking about dependencies on the PK, would marital status actually be dependant? As you say, if the ID changes, first name and last name WILL change, but potentially maritial status wouldn't? (i haven't finished the video yet btw)
@revjohnlee
@revjohnlee 3 жыл бұрын
I would love for you to make some further videos in this series about the higher order normalizations. You've explained so well that I would enjoy the explanations even though I doubt I would ever be called upon to render 5th or 6th normal forms.
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
I'll do something about 4NF (and mention the others), but as you said, there isn't much call for higher order normalisation these days, especially as storage becomes ever cheaper. The NoSQL is on the rise. :)KD
@hassan7522
@hassan7522 2 жыл бұрын
3:32 but when you change the id from 1 to 2 then the maritial status doesnt change. So wouldnt that mean that maritial status is not dependent of id because it doesnt change when id changes?
@Ben_True
@Ben_True 2 ай бұрын
wouldnt it be better to create a table for each separate subject ? for eg maths(student Id, grade). wont the table get messy when adding more subjects and especially students?
@ComputerScienceLessons
@ComputerScienceLessons 2 ай бұрын
You could take that approach but if a school wanted to introduce a new subject they would have to get the database developer back in to upgrade the system for them.
@Iamnabink
@Iamnabink 6 жыл бұрын
Just awesome.Loved your Tutorial videos. Keep uploading. :)
@ComputerScienceLessons
@ComputerScienceLessons 6 жыл бұрын
Thanks a million. :)
@noahrubin375
@noahrubin375 4 жыл бұрын
I now hit like on these videos before they even start
@naderkilani1421
@naderkilani1421 4 жыл бұрын
Usually a course will have a COURSE ID, why can't find one here?
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
A COURSE ID is not necessary if the course title is always unique. The course title can act as a primary key (in this scenario). Having said that, I've worked in organisations that encouraged database designers to include a surrogate key on every table. :)KD
@naderkilani1421
@naderkilani1421 4 жыл бұрын
@@ComputerScienceLessons Oh, I see. Thanks for the clarification ,well explained tutorial.
@didintlem_
@didintlem_ 10 ай бұрын
What app do you use to create the tables?
@ComputerScienceLessons
@ComputerScienceLessons 10 ай бұрын
Microsoft Excel :)KD
@durpomak
@durpomak 5 жыл бұрын
At 6:20 in the video, what happens if the student fails the course and retakes it and fails again? This gives two identical entries in table StudentCourse.
@nyctinasty4991
@nyctinasty4991 4 жыл бұрын
im sure in a realistic scenario, there would be an extra attribute including the semester the course was taken.
@Reigh992
@Reigh992 9 ай бұрын
I don't understand functional dependency?
@Scott-YouTubeAddict
@Scott-YouTubeAddict 5 жыл бұрын
Good video. Would be better if it visually highlighted the parts while you were explaining them.
@nickt423
@nickt423 5 жыл бұрын
@3:41, what exactly do you mean by ID is the ONLY thing that FirstName, LastName and MaritalStatus are dependent on? For instance, why wouldn't FirstName be dependent on LastName?
@willlamers6929
@willlamers6929 4 жыл бұрын
In 2NF the Primary Key needs to be unique to that entry; it should identify that entry and only that entry, and the values in that entry would be dependent on that Primary key. In addition, if there were any changes to the values in that entry the Primary key will still point to the same entry. If FirstName was dependent on LastName then you could only have one entry with that last name. For example, if there was an entry for John Smith it would be the only entry for a student named Smith. John would be dependent on the name Smith. If you entered Jane Smith then you are no longer in 2NF, as there would be two entries dependent on Smith. In your scenario 'John' could be the only valid value for the primary key 'Smith'. If you made LastName and FirstName the composite key then you could enter both John Smith and Jane Smith as the combination of the names would be unique, but you could only have one entry for each of those names. As soon as you added another John or Bob Smith you would no longer be in 2NF. Finally, lets say Jane gets married and the last name changes to Jones, but there is already an entry for Jane Jones. The Primary Key JaneJones would no longer be unique and you would not be able to enter her as JaneJones, you would have to leave her as Jane Smith, as all the other tables are relying on the value 'JaneJones' to be unique and unchanging. Hoep this helps...
@michk5149
@michk5149 5 жыл бұрын
I like his voice for some reason
@ComputerScienceLessons
@ComputerScienceLessons 5 жыл бұрын
Tnx :) KD
@artistryartistry7239
@artistryartistry7239 3 жыл бұрын
Course Title and ID wouldn't be good, because students do sometimes have to take the same classes, if they fail, or want or a higher grade. Adding the date or year and semester they took the class seems like a good option though.
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
Agreed. Exactly how you implement this depends on the training organisation. Of course, this scenario is fictitious. :)D
@artistryartistry7239
@artistryartistry7239 3 жыл бұрын
@@ComputerScienceLessons Yes, and there was no date or semester field to choose from. :) I should've rephrased my comment differently. Based on the constraints of the example, what you demonstrated makes perfect sense. Thanks, this was really useful,
@10010011001100110101
@10010011001100110101 4 жыл бұрын
Bit confused with the studentcourse table... Theres still a partial dependency (grade relies on course title and ID)
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
When we say something 'depends on' something else, we really mean that it is an attribute of the same thing. For example, the cost of attending the course and the maximum number of students that can attend are aspects of a particular course - so we say they 'depend on' it. The grade on the other hand depends on both the course and the student (Kevin got a B for Physics, but a D for Basket Weaving, Will got an A for computer science and an A for Quantum Physics).
@LoopieDoo
@LoopieDoo 4 жыл бұрын
@@ComputerScienceLessons By that logic, on the Students table the last name depends on the first name because if we change the last name we must change the first name too and both first name and last name refer to student.
@subhanahmed8864
@subhanahmed8864 3 жыл бұрын
There is a functional dependency in StudentCourse table? If anyone can explain why and how not please do.
@youssefhisham6527
@youssefhisham6527 5 жыл бұрын
thanks dood
@bobray342
@bobray342 5 жыл бұрын
David Smith might want to consider the trades...
@ComputerScienceLessons
@ComputerScienceLessons 5 жыл бұрын
Who is David Smith? :)KD
@Nabil_ali-mom
@Nabil_ali-mom 6 жыл бұрын
Yes this need it
@ComputerScienceLessons
@ComputerScienceLessons 6 жыл бұрын
I hope this helps. :)
@prakashraj4519
@prakashraj4519 3 жыл бұрын
5th normal form please
@mikah4051
@mikah4051 4 жыл бұрын
Good job but my brain is sore from thinking so much.
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
Take it slowly - one step at a time. :)KD
@mikemihay
@mikemihay 5 жыл бұрын
What do you mean when you say : "Every non-key attribute is functional dependent on the primary key." So if we have a non-key depending on a composition key, this will satisfy 2nd Form ? versus having the same non-key depending just on one key of the composition key => thus this will break 2ND Form. Is this correct ?
Database Normalisation: Third Normal Form
8:30
Computer Science Lessons
Рет қаралды 160 М.
Learn Database Normalization - 1NF, 2NF, 3NF, 4NF, 5NF
28:34
Decomplexify
Рет қаралды 2,2 МЛН
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН
It works #beatbox #tiktok
00:34
BeatboxJCOP
Рет қаралды 41 МЛН
How to Easily Consolidate Data in Excel | 4K
2:56
Excel & More
Рет қаралды 2,5 М.
Database Normalisation: First Normal Form
7:27
Computer Science Lessons
Рет қаралды 117 М.
Second Normal Form (2NF) | Database Normalization | DBMS
7:13
Studytonight with Abhishek
Рет қаралды 1,2 МЛН
1st, 2nd and 3rd Normal Form (Database Normalisation)
11:42
Learn Learn Scratch Tutorials
Рет қаралды 480 М.
Database Normalization 1NF 2NF 3NF
10:26
Jesper Lowgren
Рет қаралды 193 М.
MSCD600 Normalization
19:25
CCIS Faculty
Рет қаралды 46 М.
Complete guide to Database Normalization in SQL
40:51
techTFQ
Рет қаралды 212 М.
Normalization - 1NF, 2NF, 3NF and 4NF
19:02
channel5567
Рет қаралды 2,2 МЛН
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН