Database Normalisation: Second Normal Form
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.
Пікірлер: 141
This channel is quite underrated. Thank you for publishing these videos!
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
3 жыл бұрын
Very kind of you to say so. :)KD
best explanation of normalization on the internet! thank you
@ComputerScienceLessons
4 жыл бұрын
Thanks - I appreciate the comment. :)KD
@3NESHKUMAR
4 жыл бұрын
@@ComputerScienceLessons Really, Best Explanation ...Great work
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.
Thank you so much for this series! You're much better at explaining database normalisation than our university professors.
Lifesaver! Database Systems textbook is too dense! Thanks for helping my grade! Subscribed!
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
3 жыл бұрын
Delighted to help. I agree, technobabble often makes things seem more complicated than they really are. :)KD
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
4 жыл бұрын
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
for sure it's the best explanation ever for normalization on youtube, thanks
I struggled with 2NF all day in my class but this video had the best explanation yet! Thank you so much!
It's good to know there are people who have a clear mental thought process in this industry.
@ComputerScienceLessons
3 жыл бұрын
TY :)KD
thanks man, after a 3 , 4 days of researching finally i understand 2nf from this video, you are my database hero bro :X
@ComputerScienceLessons
4 жыл бұрын
Glad to help :) KD
These vids are great. Super clear and easy to understand unlike so many others !!
@ComputerScienceLessons
4 жыл бұрын
Thank you for the lovely comment :)KD
Thank you so much for this video. You made a topic that seems so complex very simple to understand.
This was one of if not the most helpful videos I found on normalisation.
@ComputerScienceLessons
4 жыл бұрын
Thanks for the comment :) KD
This is by far the best explanation there is out there!!!!! Thank you
@ComputerScienceLessons
Жыл бұрын
You are very welcome, and thank you :)KD
Thank you. You are the only one that can explain it simply.
@ComputerScienceLessons
4 жыл бұрын
You are very welcome! :)KD
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
2 жыл бұрын
You are most welcome. Sometimes it takes only a tiny idea to switch the lightbulb on. 💡 :)KD
@GamerBoyRobby
2 жыл бұрын
@@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 😊
literally the best normalization tutorial i have ever watched !, thank you so much 💖
@ComputerScienceLessons
11 ай бұрын
Thank You :)KD
Thank you! Keep uploading, You got a new subscriber!
This is the best explanation of normalization ever!!!
@ComputerScienceLessons
4 жыл бұрын
Comments like that keep me going. Thanks a million. :) KD
Extraordinary teaching skills, well done!
@ComputerScienceLessons
2 жыл бұрын
Thank you. You're very kind :)KD
Thank you for being clear and concise. Examples were great
@ComputerScienceLessons
3 жыл бұрын
You're very welcome. Thanks for commenting :)KD
Well done. You have command on the subject and know how to explain it in clear simple English.
@ComputerScienceLessons
3 жыл бұрын
Thank you :)KD
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
Жыл бұрын
You are most welcome. Glad to help :)KD
I have watched other video about interpretation Second Normal Form and this video very helpfully thanks
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
3 жыл бұрын
Thanks for the complement. I do need to work on my visibility. :)KD
Excellent, you're a great teacher! Thanks
@ComputerScienceLessons
4 ай бұрын
Thank you. That's lovely to hear :)KD
Fantastic Explanation ... Just fantasticcc...
@ComputerScienceLessons
3 жыл бұрын
Thank you :)KD
Thank you so much for the clear explanation
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)
Thank you for explaining it so nicely!
@ComputerScienceLessons
Жыл бұрын
You're most welcome :)KD
best normalisation video on youtube
@ComputerScienceLessons
Жыл бұрын
Thank you :)KD
thanks mate! a life savior you are
@ComputerScienceLessons
4 жыл бұрын
Really appreciate the comment. :)KD
VERY helpful, thank you loads !!
@ComputerScienceLessons
4 жыл бұрын
You're welcome :)KD
thank you so much for actually giving an understandable explanation thnak you!!!!
@ComputerScienceLessons
7 ай бұрын
You are most welcome :)KD
thank you it was the best explanation for normalisation
@ComputerScienceLessons
4 ай бұрын
Thank you. You're very kind :)KD
I love you you’ve made my day
Every well made! Thank you
@ComputerScienceLessons
4 жыл бұрын
You are welcome. :)KD
Thank you so much 🙏❤
amazing as always :) Thank you so much
@ComputerScienceLessons
2 жыл бұрын
Thank you. You are very welcome :)KD
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?
من اليمن. استمر. From Yemen. Continue
@ComputerScienceLessons
4 жыл бұрын
I will. Thanks for the comment :)KD
@youssefnov9037
4 жыл бұрын
ممكن مساعده بخصوص هذا الدرس اكون شاكرتلك ضروري
thanks interwebs! good class...well explained
@youssefnov9037
4 жыл бұрын
Can you help me?? 😭😭
@liquidation22
4 жыл бұрын
@@youssefnov9037 what do you need help with?
@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
4 жыл бұрын
Wade.byker@gmail.com
Wow superb explanation
@ComputerScienceLessons
3 жыл бұрын
Thank you :)KD
@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
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...
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
2 жыл бұрын
Good point. Thanks :)KD
@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.
Just awesome.Loved your Tutorial videos. Keep uploading. :)
@ComputerScienceLessons
5 жыл бұрын
Thanks a million. :)
Good video. Would be better if it visually highlighted the parts while you were explaining them.
It took 5 years till I see ur video to understand
@ComputerScienceLessons
4 ай бұрын
Glad to help :)KD
What app do you use to create the tables?
@ComputerScienceLessons
2 ай бұрын
Microsoft Excel :)KD
Best Explanation
@ComputerScienceLessons
2 жыл бұрын
Thank you :)KD
fantastic tutorial :D
@ComputerScienceLessons
3 жыл бұрын
Thanks for the lovely comment :)KD
WELL DONE!
@ComputerScienceLessons
2 жыл бұрын
TY :)KD
thank you so much brother
@ComputerScienceLessons
4 жыл бұрын
You are most welcome. :)KD
One advice to viewer is, do not try to normalize based on what you see, rather on what there could be. If the rows may not show repeated columns at the time you view it but it could if it was populated fully.
@ComputerScienceLessons
2 жыл бұрын
Fair point. :)KD
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
2 жыл бұрын
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
Thanks so much!!!
@ComputerScienceLessons
3 жыл бұрын
You're welcome :)KD
Thank you❤❤
@ComputerScienceLessons
3 жыл бұрын
Most welcome :)KD ❤
Thenk you bro
@ComputerScienceLessons
2 жыл бұрын
You're welcome :)KD
thank you!
@ComputerScienceLessons
3 жыл бұрын
You're welcome :)KD
This video is a gem, thank you!
@ComputerScienceLessons
Жыл бұрын
You're welcome. And thank you :)KD
thanks dood
I now hit like on these videos before they even start
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
4 жыл бұрын
im sure in a realistic scenario, there would be an extra attribute including the semester the course was taken.
Yes this need it
@ComputerScienceLessons
5 жыл бұрын
I hope this helps. :)
Usually a course will have a COURSE ID, why can't find one here?
@ComputerScienceLessons
3 жыл бұрын
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
3 жыл бұрын
@@ComputerScienceLessons Oh, I see. Thanks for the clarification ,well explained tutorial.
There is a functional dependency in StudentCourse table? If anyone can explain why and how not please do.
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 ?
Bit confused with the studentcourse table... Theres still a partial dependency (grade relies on course title and ID)
@ComputerScienceLessons
3 жыл бұрын
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
3 жыл бұрын
@@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.
I don't understand functional dependency?
I like his voice for some reason
@ComputerScienceLessons
4 жыл бұрын
Tnx :) KD
David Smith might want to consider the trades...
@ComputerScienceLessons
4 жыл бұрын
Who is David Smith? :)KD
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
3 жыл бұрын
Agreed. Exactly how you implement this depends on the training organisation. Of course, this scenario is fictitious. :)D
@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,
Good job but my brain is sore from thinking so much.
@ComputerScienceLessons
4 жыл бұрын
Take it slowly - one step at a time. :)KD
5th normal form please