| |
|
If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
|
 |

04-27-07, 19:58
|
|
Registered User
|
|
Join Date: Apr 2007
Posts: 5
|
|
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_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:
PHP Code:
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?
Thanks
|
|

04-28-07, 06:37
|
|
SQL Consultant
|
|
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
|
|
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
|
|

04-28-07, 06:41
|
|
Registered User
|
|
Join Date: Apr 2007
Posts: 5
|
|
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_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
|
|

04-28-07, 07:02
|
|
SQL Consultant
|
|
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
|
|
here are two good resources:
|
|

04-28-07, 08:49
|
|
Registered User
|
|
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.
|
|

04-30-07, 06:00
|
|
Registered User
|
|
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.
|
|

04-30-07, 13:44
|
|
Registered User
|
|
Join Date: Apr 2007
Posts: 5
|
|
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.
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|