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

  • @deathnightpwnage123
    @deathnightpwnage1235 жыл бұрын

    This channel is quite underrated. Thank you for publishing these videos!

  • @TheZliKadi
    @TheZliKadi4 жыл бұрын

    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

    3 жыл бұрын

    Very kind of you to say so. :)KD

  • @jeffreytello589
    @jeffreytello5894 жыл бұрын

    best explanation of normalization on the internet! thank you

  • @ComputerScienceLessons

    @ComputerScienceLessons

    4 жыл бұрын

    Thanks - I appreciate the comment. :)KD

  • @3NESHKUMAR

    @3NESHKUMAR

    4 жыл бұрын

    @@ComputerScienceLessons Really, Best Explanation ...Great work

  • @SiddiqNx
    @SiddiqNx4 жыл бұрын

    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.

  • @user-gs2fw4nu7t
    @user-gs2fw4nu7t3 жыл бұрын

    Thank you so much for this series! You're much better at explaining database normalisation than our university professors.

  • @theDevilsCodebase
    @theDevilsCodebase5 жыл бұрын

    Lifesaver! Database Systems textbook is too dense! Thanks for helping my grade! Subscribed!

  • @dhkim5674
    @dhkim56743 жыл бұрын

    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
    @mgray9994 жыл бұрын

    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

    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

  • @fadygamilmahrousmasoud5863
    @fadygamilmahrousmasoud58633 жыл бұрын

    for sure it's the best explanation ever for normalization on youtube, thanks

  • @Jobe-bj2pq
    @Jobe-bj2pq6 ай бұрын

    I struggled with 2NF all day in my class but this video had the best explanation yet! Thank you so much!

  • @Combatechist
    @Combatechist3 жыл бұрын

    It's good to know there are people who have a clear mental thought process in this industry.

  • @ComputerScienceLessons

    @ComputerScienceLessons

    3 жыл бұрын

    TY :)KD

  • @NixTheG0at
    @NixTheG0at4 жыл бұрын

    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

    4 жыл бұрын

    Glad to help :) KD

  • @Billbillbillhahagdvdve
    @Billbillbillhahagdvdve4 жыл бұрын

    These vids are great. Super clear and easy to understand unlike so many others !!

  • @ComputerScienceLessons

    @ComputerScienceLessons

    4 жыл бұрын

    Thank you for the lovely comment :)KD

  • @tormund_gb1908
    @tormund_gb19082 жыл бұрын

    Thank you so much for this video. You made a topic that seems so complex very simple to understand.

  • @James-mv4ge
    @James-mv4ge4 жыл бұрын

    This was one of if not the most helpful videos I found on normalisation.

  • @ComputerScienceLessons

    @ComputerScienceLessons

    4 жыл бұрын

    Thanks for the comment :) 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

  • @bobbyw1074
    @bobbyw10744 жыл бұрын

    Thank you. You are the only one that can explain it simply.

  • @ComputerScienceLessons

    @ComputerScienceLessons

    4 жыл бұрын

    You are very welcome! :)KD

  • @GamerBoyRobby
    @GamerBoyRobby2 жыл бұрын

    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

    2 жыл бұрын

    You are most welcome. Sometimes it takes only a tiny idea to switch the lightbulb on. 💡 :)KD

  • @GamerBoyRobby

    @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 😊

  • @abu-bakrmohamed1707
    @abu-bakrmohamed170711 ай бұрын

    literally the best normalization tutorial i have ever watched !, thank you so much 💖

  • @ComputerScienceLessons

    @ComputerScienceLessons

    11 ай бұрын

    Thank You :)KD

  • @mikemihay
    @mikemihay5 жыл бұрын

    Thank you! Keep uploading, You got a new subscriber!

  • @JohnDoe-cn9lt
    @JohnDoe-cn9lt4 жыл бұрын

    This is the best explanation of normalization ever!!!

  • @ComputerScienceLessons

    @ComputerScienceLessons

    4 жыл бұрын

    Comments like that keep me going. Thanks a million. :) KD

  • @St1ckl3r
    @St1ckl3r2 жыл бұрын

    Extraordinary teaching skills, well done!

  • @ComputerScienceLessons

    @ComputerScienceLessons

    2 жыл бұрын

    Thank you. You're very kind :)KD

  • @wdub1362
    @wdub13623 жыл бұрын

    Thank you for being clear and concise. Examples were great

  • @ComputerScienceLessons

    @ComputerScienceLessons

    3 жыл бұрын

    You're very welcome. Thanks for commenting :)KD

  • @manilakid3
    @manilakid33 жыл бұрын

    Well done. You have command on the subject and know how to explain it in clear simple English.

  • @ComputerScienceLessons

    @ComputerScienceLessons

    3 жыл бұрын

    Thank you :)KD

  • @SinuraVinudhiWahalathanthri
    @SinuraVinudhiWahalathanthri Жыл бұрын

    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

    Жыл бұрын

    You are most welcome. Glad to help :)KD

  • @ahcmadtaufiqbinchairilanwa3904
    @ahcmadtaufiqbinchairilanwa39042 жыл бұрын

    I have watched other video about interpretation Second Normal Form and this video very helpfully thanks

  • @AayushBartaula
    @AayushBartaula3 жыл бұрын

    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

    3 жыл бұрын

    Thanks for the complement. I do need to work on my visibility. :)KD

  • @derekmiddlemiss6358
    @derekmiddlemiss63584 ай бұрын

    Excellent, you're a great teacher! Thanks

  • @ComputerScienceLessons

    @ComputerScienceLessons

    4 ай бұрын

    Thank you. That's lovely to hear :)KD

  • @bharathisundarvelu1569
    @bharathisundarvelu15693 жыл бұрын

    Fantastic Explanation ... Just fantasticcc...

  • @ComputerScienceLessons

    @ComputerScienceLessons

    3 жыл бұрын

    Thank you :)KD

  • @rufina305
    @rufina3052 жыл бұрын

    Thank you so much for the clear explanation

  • @icis27
    @icis273 жыл бұрын

    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)

  • @saumyasingh7216
    @saumyasingh7216 Жыл бұрын

    Thank you for explaining it so nicely!

  • @ComputerScienceLessons

    @ComputerScienceLessons

    Жыл бұрын

    You're most welcome :)KD

  • @Mike-vj8do
    @Mike-vj8do Жыл бұрын

    best normalisation video on youtube

  • @ComputerScienceLessons

    @ComputerScienceLessons

    Жыл бұрын

    Thank you :)KD

  • @dastanpc874
    @dastanpc8744 жыл бұрын

    thanks mate! a life savior you are

  • @ComputerScienceLessons

    @ComputerScienceLessons

    4 жыл бұрын

    Really appreciate the comment. :)KD

  • @cloudsandRain01
    @cloudsandRain014 жыл бұрын

    VERY helpful, thank you loads !!

  • @ComputerScienceLessons

    @ComputerScienceLessons

    4 жыл бұрын

    You're welcome :)KD

  • @kola3880
    @kola38807 ай бұрын

    thank you so much for actually giving an understandable explanation thnak you!!!!

  • @ComputerScienceLessons

    @ComputerScienceLessons

    7 ай бұрын

    You are most welcome :)KD

  • @selinklnc4903
    @selinklnc49034 ай бұрын

    thank you it was the best explanation for normalisation

  • @ComputerScienceLessons

    @ComputerScienceLessons

    4 ай бұрын

    Thank you. You're very kind :)KD

  • @tombaxter716
    @tombaxter7163 жыл бұрын

    I love you you’ve made my day

  • @miguelamezcua4629
    @miguelamezcua46294 жыл бұрын

    Every well made! Thank you

  • @ComputerScienceLessons

    @ComputerScienceLessons

    4 жыл бұрын

    You are welcome. :)KD

  • @ahmedziyad2731
    @ahmedziyad27315 ай бұрын

    Thank you so much 🙏❤

  • @NilakshMalpotra
    @NilakshMalpotra2 жыл бұрын

    amazing as always :) Thank you so much

  • @ComputerScienceLessons

    @ComputerScienceLessons

    2 жыл бұрын

    Thank you. You are very welcome :)KD

  • @hassan7522
    @hassan75222 жыл бұрын

    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?

  • @user-tb5dh9zz8r
    @user-tb5dh9zz8r4 жыл бұрын

    من اليمن. استمر. From Yemen. Continue

  • @ComputerScienceLessons

    @ComputerScienceLessons

    4 жыл бұрын

    I will. Thanks for the comment :)KD

  • @youssefnov9037

    @youssefnov9037

    4 жыл бұрын

    ممكن مساعده بخصوص هذا الدرس اكون شاكرتلك ضروري

  • @liquidation22
    @liquidation224 жыл бұрын

    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
    @shivangraina96983 жыл бұрын

    Wow superb explanation

  • @ComputerScienceLessons

    @ComputerScienceLessons

    3 жыл бұрын

    Thank you :)KD

  • @nickt423
    @nickt4234 жыл бұрын

    @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...

  • @artistryartistry7239
    @artistryartistry72392 жыл бұрын

    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.

  • @Iamnabink
    @Iamnabink5 жыл бұрын

    Just awesome.Loved your Tutorial videos. Keep uploading. :)

  • @ComputerScienceLessons

    @ComputerScienceLessons

    5 жыл бұрын

    Thanks a million. :)

  • @Scott-YouTubeAddict
    @Scott-YouTubeAddict4 жыл бұрын

    Good video. Would be better if it visually highlighted the parts while you were explaining them.

  • @shreenthasleem2820
    @shreenthasleem28204 ай бұрын

    It took 5 years till I see ur video to understand

  • @ComputerScienceLessons

    @ComputerScienceLessons

    4 ай бұрын

    Glad to help :)KD

  • @didintlem_
    @didintlem_2 ай бұрын

    What app do you use to create the tables?

  • @ComputerScienceLessons

    @ComputerScienceLessons

    2 ай бұрын

    Microsoft Excel :)KD

  • @paurushgargtube
    @paurushgargtube2 жыл бұрын

    Best Explanation

  • @ComputerScienceLessons

    @ComputerScienceLessons

    2 жыл бұрын

    Thank you :)KD

  • @parthshisode6125
    @parthshisode61253 жыл бұрын

    fantastic tutorial :D

  • @ComputerScienceLessons

    @ComputerScienceLessons

    3 жыл бұрын

    Thanks for the lovely comment :)KD

  • @kaltube4817
    @kaltube48172 жыл бұрын

    WELL DONE!

  • @ComputerScienceLessons

    @ComputerScienceLessons

    2 жыл бұрын

    TY :)KD

  • @abdiwahabadan1817
    @abdiwahabadan18174 жыл бұрын

    thank you so much brother

  • @ComputerScienceLessons

    @ComputerScienceLessons

    4 жыл бұрын

    You are most welcome. :)KD

  • @happylittlemonk
    @happylittlemonk2 жыл бұрын

    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

    @ComputerScienceLessons

    2 жыл бұрын

    Fair point. :)KD

  • @revjohnlee
    @revjohnlee2 жыл бұрын

    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

    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

  • @JonathanHobbe
    @JonathanHobbe3 жыл бұрын

    Thanks so much!!!

  • @ComputerScienceLessons

    @ComputerScienceLessons

    3 жыл бұрын

    You're welcome :)KD

  • @ridajaafar863
    @ridajaafar8633 жыл бұрын

    Thank you❤❤

  • @ComputerScienceLessons

    @ComputerScienceLessons

    3 жыл бұрын

    Most welcome :)KD ❤

  • @meritonqafleshi7416
    @meritonqafleshi74162 жыл бұрын

    Thenk you bro

  • @ComputerScienceLessons

    @ComputerScienceLessons

    2 жыл бұрын

    You're welcome :)KD

  • @fluorescent_axolotl
    @fluorescent_axolotl3 жыл бұрын

    thank you!

  • @ComputerScienceLessons

    @ComputerScienceLessons

    3 жыл бұрын

    You're welcome :)KD

  • @mvyhem
    @mvyhem Жыл бұрын

    This video is a gem, thank you!

  • @ComputerScienceLessons

    @ComputerScienceLessons

    Жыл бұрын

    You're welcome. And thank you :)KD

  • @youssefhisham6527
    @youssefhisham65274 жыл бұрын

    thanks dood

  • @noahrubin375
    @noahrubin3753 жыл бұрын

    I now hit like on these videos before they even start

  • @durpomak
    @durpomak4 жыл бұрын

    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.

  • @Nabil_ali-mom
    @Nabil_ali-mom5 жыл бұрын

    Yes this need it

  • @ComputerScienceLessons

    @ComputerScienceLessons

    5 жыл бұрын

    I hope this helps. :)

  • @naderkilani1421
    @naderkilani14213 жыл бұрын

    Usually a course will have a COURSE ID, why can't find one here?

  • @ComputerScienceLessons

    @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

    @naderkilani1421

    3 жыл бұрын

    @@ComputerScienceLessons Oh, I see. Thanks for the clarification ,well explained tutorial.

  • @subhanahmed8864
    @subhanahmed88642 жыл бұрын

    There is a functional dependency in StudentCourse table? If anyone can explain why and how not please do.

  • @mikemihay
    @mikemihay5 жыл бұрын

    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 ?

  • @10010011001100110101
    @100100110011001101013 жыл бұрын

    Bit confused with the studentcourse table... Theres still a partial dependency (grade relies on course title and ID)

  • @ComputerScienceLessons

    @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

    @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.

  • @Reigh992
    @Reigh992Ай бұрын

    I don't understand functional dependency?

  • @michk5149
    @michk51494 жыл бұрын

    I like his voice for some reason

  • @ComputerScienceLessons

    @ComputerScienceLessons

    4 жыл бұрын

    Tnx :) KD

  • @bobray342
    @bobray3424 жыл бұрын

    David Smith might want to consider the trades...

  • @ComputerScienceLessons

    @ComputerScienceLessons

    4 жыл бұрын

    Who is David Smith? :)KD

  • @artistryartistry7239
    @artistryartistry72393 жыл бұрын

    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,

  • @mikah4051
    @mikah40514 жыл бұрын

    Good job but my brain is sore from thinking so much.

  • @ComputerScienceLessons

    @ComputerScienceLessons

    4 жыл бұрын

    Take it slowly - one step at a time. :)KD

  • @prakashraj4519
    @prakashraj45192 жыл бұрын

    5th normal form please