Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2012

    Normalization of similar attributes (same information)


    if I have a table like this:
    school:= SID (PK), ..., room1, room2, room3, ..., roomX

    which needs to be normalized, against which NF is this multi-column attribute room ?

    I know it should look something like this if there's a 1:m relationship
    school:= SID(PK), ...
    room:=RID(PK), SID(FK)

    but which NF is it breaking?

    Okay since there is just one primary key in this relation, it can't be the second NF. Neither third, because there is no other attribute, but the pk, which determines the attributes room1, room2, room3.
    So this sort of repetition is also against the first normal form?
    Last edited by Witchcraft; 10-13-12 at 10:33.

  2. #2
    Join Date
    Apr 2002
    Toronto, Canada
    Quote Originally Posted by Witchcraft View Post
    So this sort of repetition is also against the first normal form?
    in spirit, yes, but not according to the letter of the law

    if each column (room1,room2,room3,etc.) contains only one value, then the table satisfies 1NF

    however, it is obvious that such a table is horrendously awkward to work with

    don't do it | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Oct 2012
    Thank you!

Posting Permissions

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