I am a bit confused with normalization, hopefully someone here can help me out.
I got the following unnormalized list:
UNNORMALIZED
R1 = (ward_no, ward_name, patient_no, first_name, last_name, drug_card_no (drug_code, drug_name, date_dispensed, dosage))
Now i want to normalize it to the 3NF.
This is what i have tried:
1NF
R11 = (ward_no, ward_name (patient_no, first_name, last_name, drug_card_no))
R12 = (drug_code, drug_name, date_dispensed, dosage)
2NF
R111 = (ward_no, ward_name)
R112 = (ward_no, patient_no, first_name, last_name, drug_card_no)
R12 = (drug_code, drug_name, date_dispensed, dosage)
3NF
R111 = (ward_no, ward_name)
R1121 = (ward_no, patient_no, first_name)
R1122 = (first_name, last_name, drug_card_no)
R12 = (drug_code, drug_name, date_dispensed, dosage)
But now am not sure if its right. I think i may be missing somethings. could someone advise?
Thanks1NF 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|||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:
1NF
R11 = (ward_no, ward_name patient_no, first_name, last_name, drug_card_no)
R12 = (drug_code, drug_name, date_dispensed, dosage)
without that new group? anything else|||here are two good resources:
Relational Data Architecture (PDF) (http://www.oreilly.com/catalog/javadtabp/chapter/ch02.pdf)
3 Normal Forms Database Tutorial (http://www.phlonx.com/resources/nf3/)|||i understand the rules but then once i try doin on i jus get confused i u can see in the above.|||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.|||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.
Monday, March 26, 2012
Normalization
Labels:
bit,
database,
following,
listunnormalizedr1,
microsoft,
mysql,
normalization,
oracle,
server,
sql,
unnormalized,
ward_no
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment