Results 1 to 8 of 8
  1. #1
    Join Date
    Sep 2013
    Posts
    3

    Question Need Help: Normalization

    Good day,

    I'm having great difficulties understanding databases because I'm really new to it.

    Can someone help and possible teach me how to normalize this. For example, this is the main database of an enrollment system, all the data in here is about the student, the transactions and the student's acadamics. Can someone help how to normalize this at least, to it's 3rd form.


    Main (StudID, Name, Bday, Age, DateBirth, PlaceBirth,Guardian, GuaContact, CurrentLvl, ORNumber, CashierID, Cashier Name, Amount, Balance, PartialPay, FullPay, ClassID, TeacherID, Level, Section, SchoolYrID, SchoolYrStart, SchoolYrEnd, TeacherName, TeachingSubj, SubjID, SubjName, SubjDesc, FirstGrade, SecondGrade, ThirdGrade, FourthGrade)



    Any help would be greatly appreciated.

    Thank you for reading.

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    what have you tried
    what book have you looked at
    these two are good basics
    Fundamentals of Relational Database Design -- r937.com
    and
    The Relational Data Model, Normalisation and effective Database Design

    what are you stuck ojn

    at this level concentrate on the entities and their respectvie keys
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Sep 2013
    Posts
    3
    Student (StudID, Name, Bday, Age, DateBirth, PlaceBirth, Guardian, GuaContact, CurrentLvl, ORNumber, ClassID)

    Transaction (ORNumber, CashierID, CashierName, Amount, Balance, PartialPay, FullPay)

    Academic (ClassID, TeacherID, Level, Section, SchoolYrID, SchoolYrStart, SchoolYrEnd, TeacherName, SubjID, SubjName, FirstGrade, SecondGrade, ThirdGrade, FourthGrade)


    first I did this ^, I separated Student from the main, and made another table for transaction and another for Academic.




    Student (StudID, Name, Bday, Age, DateBirth, PlaceBirth, Guardian, GuaContact, CurrentLvl, ORNumber, ClassID)


    Transaction (ORNumber, CashierID, Amount, Balance, PartialPay, FullPay)

    Cashier (CashierID, CashierName)


    Academic (ClassID, TeacherID, Level, Section, SchoolYrID, SchoolYrStart, SchoolYrEnd, TeacherName, SubjID, SubjName, FirstGrade, SecondGrade, ThirdGrade, FourthGrade)

    Academic (ClassID, SubjID, TeacherID, Level, Section)
    Subject (SubjID, SubjName, TeacherID, TeacherName,FirstGrade, SecondGrade, ThirdGrade, FourthGrade)
    School Year(SchoolYrID, SchoolYrID, SchoolYrStart, SchoolYrEnd)




    then this^, I separated the cashier details from transaction. For academic I separated separated a few datas and put it to a new table and I named it subject. Also separated School year.


    Student (StudID, StudName, Bday, Age, DateBirth, PlaceBirth, Guardian, GuaContact, CurrentLvl, ORNumber, ClassID)

    Grade (StudID, FirstGrade, SecondGrade, ThirdGrade, FourthGrade)


    Transaction (ORNumber, CashierID, Amount, Balance, PartialPay, FullPay)

    Cashier (CashierID, CashierName)




    Academic (ClassID, TeacherID, Level, Section)

    SchoolYear (SchoolYrID, SchoolYrStart, SchoolYrEnd)

    Subject (SubjID, SubjName)
    Teacher (Teacher ID, TeacherName)



    This is ^ the last one. I dunno, I just did everything based on instinct and based on few reference. I really cant understand how the atomic and not atomic work and how to further normalize.

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    if you see repeating data then its usually a strong indication that you haven't fully normalised the design.

    ferisntace as you correctly identified by stripping out the cashiername from the transaction because the same cashier could handle multiple transactions

    so apply the same logic to your other tables
    analyse what is going on
    make certain that you have eliminated such duplications.

    however someitmes a duplication may not be immediately obvious
    ferinstance is guardian a repeating element or not
    at first glance you might be temtped to regard it as non repeating, hwoever a pupil mau have on or more guardians, likewise a guardian may have one or more wards. so guardian is probably justifies it own table. however its a design choice and providing you conciously decide whether it does or doesn't and don't just lapse into a (non) decision and document why you made that choice then you can legitimately ignore soem of the more esoteric bits of normalisation.

    personally I think guardian should be a separate entity.

    if you think in terms of object x has many object y you'll not be far wrong

    FirstGrade, SecondGrade, ThirdGrade, FourthGrade:- looks very odd to me
    can you get a grade for first, second, third AND fourth at the same time
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    Sep 2013
    Posts
    3
    Oh i see, but I can't seem to determine which is the 1st nf or 2nd nf and 3rd nf. as I said I based my normalization on my own understanding.

    And for the 1st, 2nd, 3rd, and 4th grade. consider that the school has quarterly grading periods. After the computation of the first quarter,a student will receive his/her grade for the first period, and will get blank entries for 2nd, 3rd and 4th, that is why I placed them together.

  6. #6
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Quote Originally Posted by LionKung View Post
    Oh i see, but I can't seem to determine which is the 1st nf or 2nd nf and 3rd nf. as I said I based my normalization on my own understanding.
    if you aren't certain you understand normalisation and why you do it in db design and you have soem homework that requires normalisation then go read up on it.
    The Relational Data Model, Normalisation and effective Database Design

    if you have been attending classes and haven't grasped the principles then go talk to the person instruction you.

    there is a reason why when teaching the process requests you go through the 1,2,3 and other 'normal' forms. I guess its rare for db designers doing live jobs will follow those steps as usually can identify whats required in one pass to satisay 3rd, 4th or BCNF
    I'd rather be riding on the Tiger 800 or the Norton

  7. #7
    Join Date
    Dec 2007
    Location
    London, UK
    Posts
    741
    Quote Originally Posted by healdem View Post
    there is a reason why when teaching the process requests you go through the 1,2,3 and other 'normal' forms.
    I wonder if there really is a good reason though? The most important Normal Forms are EKNF, BCNF and 5NF. Any one of those means by definition that the lesser NFs are already being satisfied. BCNF and 5NF are the simplest to explain and the most appropriate for CASE tools and schema design by algorithm. EKNF and BCNF are more salient milestones than either 2NF or 3NF (BCNF being the "ultimate" NF with respect to FDs and EKNF the ultimate FD-preserving NF). 1NF (in either of Codd's formulations) is sui generis, controversial and fairly arbitrary in its practical applications.

    So I suspect the real reasons why 1,2,3,... might still be taught are: history, ignorance or the easy allure of Rule of Three. A more rational approach would be to teach the principle of Join Dependency first, then 5NF, EKNF, BCNF. Mention 2NF and 3NF as being of historical interest only.

  8. #8
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    it could be 'rule of three', however I have my doubts. Ive always put it down to a mechanism of how to approach the problem, how to understand the principles. it seems a route that is fine for learning, but like many learning tools its of limited use in the real word. or at least putting down on paper.
    I'd rather be riding on the Tiger 800 or the Norton

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •