Results 1 to 7 of 7

Thread: Normalization

  1. #1
    Join Date
    Apr 2007
    Posts
    5

    Question Unanswered: Normalization

    I am a bit confused with normalization, hopefully someone here can help me out.
    I got the following unnormalized list:

    PHP Code:
    UNNORMALIZED
    R1 
    = (ward_noward_namepatient_nofirst_namelast_namedrug_card_no (drug_codedrug_namedate_dispenseddosage)) 
    Now i want to normalize it to the 3NF.
    This is what i have tried:

    PHP Code:
    1NF
    R11 
    = (ward_noward_name (patient_nofirst_namelast_namedrug_card_no))
    R12 = (drug_codedrug_namedate_dispenseddosage)

    2NF
    R111 
    = (ward_noward_name)
    R112 = (ward_nopatient_nofirst_namelast_namedrug_card_no)
    R12 = (drug_codedrug_namedate_dispenseddosage)

    3NF
    R111 
    = (ward_noward_name)
    R1121 = (ward_nopatient_nofirst_name)
    R1122 = (first_namelast_namedrug_card_no)
    R12 = (drug_codedrug_namedate_dispenseddosage
    But now am not sure if its right. I think i may be missing somethings. could someone advise?
    Thanks

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    1NF means no repeating groups

    it looks like R11 repeats patients in a ward, so that fails 1NF

    what are you using as your reference for normalization? a textbook or the internet? if a textbook, please give its title and author, if the internet, please give urls of the sites you're using
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Apr 2007
    Posts
    5

    Question ok

    Well im just using the lecture slide note we got in class.
    now for that 1NF i know what you mean so i was thinking like this:
    PHP Code:
    1NF 
    R11 
    = (ward_noward_name patient_nofirst_namelast_namedrug_card_no)
    R12 = (drug_codedrug_namedate_dispenseddosage
    without that new group? anything else

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002

  5. #5
    Join Date
    Apr 2007
    Posts
    5

    hmm

    i understand the rules but then once i try doin on i jus get confused i u can see in the above.

  6. #6
    Join Date
    Mar 2007
    Location
    636f6d7075746572
    Posts
    770
    Can you give us a sample of your data. Then we can show you the transition to 1NF, 2NF, 3NF. The problem is that you have a represented your initial data in a column related format so we can't actually see where data repeats itself.

    The two rules to follow for 1NF are :
    1. A row of data cannot contain repeating groups of similar data (atomicity); and
    2. Each row of data must have a unique identifier (or Primary Key).

    You initial line actually looks like 1NF already to me, however it doesn't identify primary keys.

  7. #7
    Join Date
    Apr 2007
    Posts
    5

    Question ok

    ummm well this is what i was given:

    R1 = (ward_no, ward_name, patient_no, first_name, last_name, drug_card_no (drug_code, drug_name, date_dispensed, dosage))

    thats all i can give u sorry.

Posting Permissions

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