Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2011

    Normalization with internal dependancy


    I have a table storing score and level information of a user. Both are integers. Level value depends on score and mapping is not expressable as a mathematical function. There are min, max values of points for every level.

    Please help me to design the dabase table. My problem is, if use level as a column in user table, it doesnt normalize as 2NF as level changes as per score and not as per primary key only (which is say - username). Please suggest me some alternative so that i can define properly normalized tables.

    I am new to this forum, so plee forgive me if this is too obvisous or repeated question.

  2. #2
    Join Date
    Feb 2004
    In front of the computer
    There is no problem with storing two different values that are casually related in the same row of a table as long as both values are directly related to that row's primary key. Keeping the point score and the level for a given user makes perfect sense to me.

    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  3. #3
    Join Date
    Apr 2002
    Toronto, Canada
    "casually" being the operative word | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

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