Database Normalisation: Second Normal Form

Поделиться
HTML-код
  • Опубликовано: 12 янв 2019
  • 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.

Комментарии • 143

  • @deathnightpwnage123
    @deathnightpwnage123 5 лет назад +41

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

  • @TheZliKadi
    @TheZliKadi 4 года назад +41

    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

  • @jeffreytello589
    @jeffreytello589 4 года назад +27

    best explanation of normalization on the internet! thank you

    • @ComputerScienceLessons
      @ComputerScienceLessons  4 года назад +1

      Thanks - I appreciate the comment. :)KD

    • @3NESHKUMAR
      @3NESHKUMAR 4 года назад

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

  • @SiddiqNx
    @SiddiqNx 5 лет назад +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.

  • @user-gs2fw4nu7t
    @user-gs2fw4nu7t 3 года назад +5

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

  • @katruya
    @katruya 5 лет назад +6

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

  • @dhkim5674
    @dhkim5674 3 года назад +2

    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

  • @NixTheG0at
    @NixTheG0at 4 года назад +4

    thanks man, after a 3 , 4 days of researching finally i understand 2nf from this video, you are my database hero bro :X

  • @fadygamilmahrousmasoud5863
    @fadygamilmahrousmasoud5863 3 года назад

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

  • @Billbillbillhahagdvdve
    @Billbillbillhahagdvdve 4 года назад +1

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

  • @mgray999
    @mgray999 4 года назад +2

    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

  • @James-mv4ge
    @James-mv4ge 4 года назад +1

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

  • @iyasuwalalign2860
    @iyasuwalalign2860 Месяц назад

    ur voice ,logicallity of teaching is just perfect

  • @bobbyw1074
    @bobbyw1074 4 года назад +1

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

  • @Combatechist
    @Combatechist 3 года назад +1

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

  • @tormund_gb1908
    @tormund_gb1908 3 года назад

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

  • @Jobe-bj2pq
    @Jobe-bj2pq 8 месяцев назад

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

  • @abu-bakrmohamed1707
    @abu-bakrmohamed1707 Год назад +1

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

  • @jamie-leevellem91
    @jamie-leevellem91 Год назад +1

    This is by far the best explanation there is out there!!!!! Thank you

  • @mikemihay
    @mikemihay 5 лет назад

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

  • @mikekirby5592
    @mikekirby5592 23 дня назад

    Superior treatment of normalization; great teacher

  • @wdub1362
    @wdub1362 3 года назад +1

    Thank you for being clear and concise. Examples were great

  • @JohnDoe-cn9lt
    @JohnDoe-cn9lt 4 года назад +1

    This is the best explanation of normalization ever!!!

  • @St1ckl3r
    @St1ckl3r 2 года назад +1

    Extraordinary teaching skills, well done!

  • @SinuraVinudhiWahalathanthri
    @SinuraVinudhiWahalathanthri Год назад +1

    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

  • @GamerBoyRobby
    @GamerBoyRobby 2 года назад

    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 года назад +1

      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 😊

  • @dastanpc874
    @dastanpc874 4 года назад +1

    thanks mate! a life savior you are

  • @derekmiddlemiss6358
    @derekmiddlemiss6358 6 месяцев назад +1

    Excellent, you're a great teacher! Thanks

  • @manilakid3
    @manilakid3 3 года назад +1

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

  • @rufina305
    @rufina305 2 года назад

    Thank you so much for the clear explanation

  • @saumyasingh7216
    @saumyasingh7216 Год назад +1

    Thank you for explaining it so nicely!

  • @cloudsandRain01
    @cloudsandRain01 4 года назад +1

    VERY helpful, thank you loads !!

  • @tombaxter716
    @tombaxter716 3 года назад +1

    I love you you’ve made my day

  • @ahcmadtaufiqbinchairilanwa3904
    @ahcmadtaufiqbinchairilanwa3904 2 года назад

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

  • @Mike-vj8do
    @Mike-vj8do Год назад +1

    best normalisation video on youtube

  • @miguelamezcua4629
    @miguelamezcua4629 4 года назад +1

    Every well made! Thank you

  • @kola3880
    @kola3880 8 месяцев назад +1

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

  • @bharathisundarvelu1569
    @bharathisundarvelu1569 3 года назад +1

    Fantastic Explanation ... Just fantasticcc...

  • @selinklnc4903
    @selinklnc4903 6 месяцев назад +1

    thank you it was the best explanation for normalisation

  • @NilakshMalpotra
    @NilakshMalpotra 2 года назад +1

    amazing as always :) Thank you so much

  • @AayushBartaula
    @AayushBartaula 3 года назад +1

    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

  • @icis27
    @icis27 3 года назад

    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)

  • @user-tb5dh9zz8r
    @user-tb5dh9zz8r 4 года назад +2

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

    • @ComputerScienceLessons
      @ComputerScienceLessons  4 года назад

      I will. Thanks for the comment :)KD

    • @youssefnov9037
      @youssefnov9037 4 года назад

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

  • @ahmedziyad2731
    @ahmedziyad2731 7 месяцев назад

    Thank you so much 🙏❤

  • @kaltube4817
    @kaltube4817 2 года назад +1

    WELL DONE!

  • @JonathanHobbe
    @JonathanHobbe 3 года назад +1

    Thanks so much!!!

  • @liquidation22
    @liquidation22 4 года назад +1

    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

  • @Iamnabink
    @Iamnabink 5 лет назад +1

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

  • @parthshisode6125
    @parthshisode6125 3 года назад +1

    fantastic tutorial :D

  • @nickt423
    @nickt423 4 года назад

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

  • @shivangraina9698
    @shivangraina9698 3 года назад

    Wow superb explanation

  • @mvyhem
    @mvyhem Год назад +1

    This video is a gem, thank you!

  • @paurushgargtube
    @paurushgargtube 2 года назад +1

    Best Explanation

  • @abdiwahabadan1817
    @abdiwahabadan1817 4 года назад +1

    thank you so much brother

  • @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?

  • @fluorescent_axolotl
    @fluorescent_axolotl 3 года назад +1

    thank you!

  • @shreenthasleem2820
    @shreenthasleem2820 5 месяцев назад +1

    It took 5 years till I see ur video to understand

  • @artistryartistry7239
    @artistryartistry7239 2 года назад +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 года назад +1

      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.

  • @ridajaafar863
    @ridajaafar863 3 года назад +1

    Thank you❤❤

  • @Scott-YouTubeAddict
    @Scott-YouTubeAddict 4 года назад

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

  • @revjohnlee
    @revjohnlee 2 года назад +1

    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 года назад +1

      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

  • @youssefhisham6527
    @youssefhisham6527 4 года назад +1

    thanks dood

  • @Nabil_ali-mom
    @Nabil_ali-mom 5 лет назад

    Yes this need it

  • @meritonqafleshi7416
    @meritonqafleshi7416 2 года назад +1

    Thenk you bro

  • @didintlem_
    @didintlem_ 3 месяца назад +1

    What app do you use to create the tables?

  • @noahrubin375
    @noahrubin375 3 года назад

    I now hit like on these videos before they even start

  • @happylittlemonk
    @happylittlemonk 2 года назад +1

    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.

  • @durpomak
    @durpomak 4 года назад

    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.

  • @subhanahmed8864
    @subhanahmed8864 2 года назад

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

  • @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 ?

  • @naderkilani1421
    @naderkilani1421 3 года назад +1

    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.

  • @michk5149
    @michk5149 4 года назад +1

    I like his voice for some reason

  • @10010011001100110101
    @10010011001100110101 3 года назад

    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.

  • @bobray342
    @bobray342 4 года назад

    David Smith might want to consider the trades...

  • @artistryartistry7239
    @artistryartistry7239 3 года назад +1

    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,

  • @Reigh992
    @Reigh992 2 месяца назад

    I don't understand functional dependency?

  • @mikah4051
    @mikah4051 4 года назад

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

  • @prakashraj4519
    @prakashraj4519 2 года назад

    5th normal form please