Professional Documents
Culture Documents
Hospital Normalization Key
Hospital Normalization Key
Unnormalized Table
Staff No. S123 S098 Name Morgan Russell Address 23A George Street Tel No. 01506-67676 Position Nurse Staff Nurse Shift Late Late Ward 11 Ward No.
This one as part of the PK is optional, if it is assumed that the staff can change wards in one week, then this is needed
Ward Name
Location
Week beginning
Charge Nurse
Orthopaedic
Block E
1/9/1998
Moira Samuel
S011
7711
When moving from an Unnormalized table to 1NF you need to take out repeating groups. One approach is to fill in empty cells. A second is to split out the repeating elements into a new table.
1NF Table
Staff No. S098 S123 Ward No. Ward 11 Staff Name Address Tel No. Position Staff Nurse Nurse Charge Nurse Moira Samuel Shift Late Late Charge Nurse No. S011 Ward No. Ward 11 Ward 11 Week beginning 1/9/1998 1/9/1998 Carol Cummings 15 High Street Edinburgh 0131-334-5677 Morgan Russell Ward Name Orthopaedic 23A George Street Location Block E 01506-67676 Tel Extn. 7711
OR
1NF Table
Staff No. S098 S123
Staff Name
Address
Tel No.
Carol Cummings 15 High Street Edinburgh 0131-334-5677 Morgan Russell 23A George Street 01506-67676
When moving from 1NF to 2NF you remove partial dependencies. Staff and Ward info are partially dependent on the PK
2NF Table
Staff No. S098 S123 Ward No. Ward 11 Ward 11 Week beginning 1/9/1998 1/9/1998 Shift Late Late
Staff Name
Address
Tel No.
Carol Cummings 15 High Street Edinburgh 0131-334-5677 Morgan Russell 23A George Street 01506-67676
Location Block E
When moving from 2NF to 3NF one must remove transitive dependencies A transitive dependency exists with the charge nurse information.
3NF Table
Staff No. S098 S123 Ward No. Ward 11 Ward 11 Week beginning 1/9/1998 1/9/1998 Shift Late Late
Charge Nurse Moira Samuel Staff Name Address Tel No. Position Staff Nurse Nurse
Carol Cummings 15 High Street Edinburgh 0131-334-5677 Morgan Russell 23A George Street 01506-67676
Location Block E
BCNF Table
There are no determinants that are not candidate keys, therefore the above tables are also in BCNF
Unnormalized Table
Patient No. P10234 Patient First Name Anne Patient Last Name Phelps Patient Address Sex Tel No. DOB. ### Marital Status Date Reg. N-O-K Name Single 2/21/1995 James Phelps Relationship Father 44 North Bridges Cannonmills Edinburgh Female 0131-332-4111
When moving from an Unnormalized table to 1NF you need to take out repeating groups. Since there is no repeating groups, the table is already in 1NF.
1NF Table
Patient No. P10234 Patient First Name Anne Patient Last Name Phelps Patient Address Sex Tel No. DOB. ### Marital Status Date Reg. N-O-K Name Single 2/21/1995 James Phelps Relationship Father
When moving from 1NF to 2NF you need to remove partial dependencies All attributes are fully dependent on the Primary Key so the table is in 2NF.
2NF Table
Patient No. P10234 Patient First Name Anne Patient Last Name Phelps Patient Address Sex Tel No. DOB. ### Marital Status Date Reg. N-O-K Name Single 2/21/1995 James Phelps Relationship Father
When moving from 2NF to 3NF one must remove transitive dependencies There are two transitive dependencies that exist, Next of Kin Information is dependent upon Next of Kin Name and Clinic Information is dependent upon Doctor's Name
3NF Table
Patient No. P10234 Patient First Name Anne Patient Last Name Phelps Patient Address Sex Tel No. DOB. ### Marital Status Date Reg. N-O-K Name Local Doctor's Name Single 2/21/1995 James Phelps Dr. Helen Pearson
Relationship Father
BCNF Table
There are no determinants that are not candidate keys, therefore the above tables are also in BCNF
Clinic No. Doctor's Address E102 22 Cannongate Way Edinburgh EH1 6TY
Clinic No. Doctor's Address E102 22 Cannongate Way Edinburgh EH1 6TY
Clinic No. Doctor's Address E102 22 Cannongate Way Edinburgh EH1 6TY
Unnormalized Table
Patient No. P10234 Patient First Name Patient Last Name Anne Phelps Patient Address 44 North Bridges Cannonmills Edinburgh Sex Tel No. DOB. Marital Status Date Reg. N-O-K Name Single 2/21/1995 James Phelps Relationship Father N-O-K Address 145 Rowlands Street Paisley PA2 5FE N-O-K Tel No. Local's Doctor's Name Clinic No. Doctor's Address E102 22 Cannongate Way Edinburgh EH1 6TY Doctor's Tel No. 0131-332-0012 Female 0131-332-4111 ### 0141-848-2211 Dr. Helen Pearson
When moving from an Unnormalized table to 1NF you need to take out repeating groups. Since there is no repeating groups the table is already in 1NF.
1NF Table
Patient No. P10234 Patient First Name Patient Last Name Anne Phelps Patient Address 44 North Bridges Cannonmills Edinburgh Sex Tel No. DOB. Marital Status Date Reg. N-O-K Name Single 2/21/1995 James Phelps Relationship Father N-O-K Address 145 Rowlands Street Paisley PA2 5FE N-O-K Tel No. Local's Doctor's Name Clinic No. Doctor's Address E102 22 Cannongate Way Edinburgh EH1 6TY Doctor's Tel No. 0131-332-0012
When moving from 1NF to 2NF you must remove partial dependencies There are several partial dependencies. Specifically, NOK information except for relationship is partially dependent on NOK and Patient Information is partially dependent on patient information
2NF Table
Patient No. P10234 N-O-K Name James Phelps Relationship Father
Address
Tel No.
Sex
Tel No.
DOB.
Marital Status Date Reg. Local Doctor's Name Clinic No. Single 2/21/1995 Dr. Helen Pearson E102
Address
Tel No.
When moving from 2NF to 3NF I must remove the transitive dependencies that exist. There is a transitive dependency for Dr. information
3NF Table
Patient No. P10234 N-O-K Name James Phelps Relationship Father
Address
Tel No.
Address
Tel No.
Sex
Tel No.
DOB.
Marital Status Date Reg. Local Doctor's Name Single 2/21/1995 Dr. Helen Pearson
BCNF Table
There are no determinants that are not candidate keys, therefore the above tables are also in BCNF
Unnormalized Table
Ward No. Ward 11 Ward Name Orthopaedic Location Block E Charge Nurse Moira Samuel Charge Nurse No. Tel Extn. S011 7711 Patient No. P10451 P10480 Patient Name Date on Waiting List Expected Stay Robert Drumtree 1/12/1998 5 Steven Parks 1/12/1998 4 Date Placed 1/12/1998 1/14/1998 Date Leave 1/17/1998 1/18/1998 Actual LeaveBed Number 84 79
When moving from an Unnormalized table to 1NF you need to take out repeating groups. One approach is to fill in empty cells. A second is to split out the repeating elements into a new table.
1NF Table
Ward No. Ward 11 Ward Name Orthopaedic Location Block E Charge Nurse Moira Samuel Charge Nurse No. Tel Extn. S011 7711
Patient Name Date on Waiting List Expected Stay Robert Drumtree 1/12/1998 5 Steven Parks 1/12/1998 4
OR
Ward No. Ward 11 Ward 11
2NF Table
To move a table to 2NF, we must remove partial dependencies. One partial dependency exists between patient name and patient no.
Date on Waiting List Expected Stay 1/12/1998 5 1/12/1998 4 Patient Name Robert Drumtree Steven Parks
Actual Leave
3NF Table
When moving from 2NF to 3NF one must remove transitive dependencies There are several transitive dependencies. One is between bed no. and ward no., a second is between the ward # and the ward information, and a third is between charge nurse # and charge nurse name. Patient No. Date on Waiting List Expected Stay Date Placed Date Leave Actual Leave Bed Number P10451 1/12/1998 5 1/12/1998 1/17/1998 84 P10480 1/12/1998 4 1/14/1998 1/18/1998 79 Patient No. P10451 P10480 Bed Number 84 79 Ward No. Ward 11 Ward 11 Charge Nurse No. S011 Patient Name Robert Drumtree Steven Parks Ward No. Ward 11 Ward 11 Ward Name Orthopaedic Orthopaedic Charge Nurse Moira Samuel Location Block E Block E Charge Nurse No. S011 S011 Tel Extn. 7711 7711
BCNF Table
There are no (important) determinants that are not candidate keys, therefore the above tables could be considered to be in BCNF. However, Date Leave is determined by a combination of Date Placed and Expected Stay. These dependencies violate BCNF. To fix this we would move Date Placed, Expected Stay, and Date Leave in a new table. Although this is technically correct for normalization purposes, it is not practical. This arises because Date Leave is a calculated field and it demonstrates one of the problems with including derived (calculated) fields in a table. Patient No. P10451 P10480 Patient No. P10451 P10480 Bed Number 84 79 Ward No. Ward 11 Ward 11 Charge Nurse No. S011 Date Placed 1/12/1998 1/14/1998 Date on Waiting List Expected Stay 1/12/1998 5 1/12/1998 4 Patient Name Robert Drumtree Steven Parks Ward No. Ward 11 Ward 11 Ward Name Orthopaedic Orthopaedic Charge Nurse Moira Samuel Date Leave 1/17/1998 1/18/1998 Expected Stay 5 4 Location Block E Block E Charge Nurse No. S011 S011 Tel Extn. 7711 7711 Date Placed 1/12/1998 1/14/1998 Actual Leave Bed Number 84 79
Unnormalized Table
Patient No. P10034 Patient Name Ward No. Robert MacDonald Ward 11 Ward Name Bed Number Orthopaedic 84 Drug No. 10223 10334 Drug Name Description Dosage Morphine Pain Killer 10mg/ml Tetracycline Antibiotic 0.5 mg/ml Method of Adim Units Per Day Start Date Finish Date Oral 50 3/24/1998 4/24/1998 IV 10 3/24/1998 4/17/1998
When moving from an Unnormalized table to 1NF you need to take out repeating groups. One approach is to fill in empty cells. A second is to split out the repeating elements into a new table.
1NF Table
Patient No. P10034 Patient Name Ward No. Robert MacDonald Ward 11 Ward Name Bed Number Orthopaedic 84
Method of Adin Units Per Day Start Date Oral 50 3/24/1998 IV 10 3/24/1998
OR
Patient No. P10034 P10034
When moving from 1NF to 2NF you remove partial dependencies. 2 partial dependencies exist; one for patient information and a second for drug information
2NF Table
Patient No. P10034 P10034 Patient No. P10034 Drug No. 10223 10334 Drug No. 10223 10334 Units Per Day Start Date 50 3/24/1998 10 3/24/1998 Finish Date 4/24/1998 4/17/1998
Patient Name Ward No. Robert MacDonald Ward 11 Drug Name Morphine Tetracycline Description Pain Killer Antibiotic
Ward Name Bed Number Orthopaedic 84 Dosage 10mg/ml 0.5 mg/ml Method of Adim Oral IV
When moving from 2NF to 3NF, remove the transitive dependencies that exist. There are two transitive dependencies that exist; Ward Information is functionally dependent on Ward # and Ward # is functionally dependent on Bed #.
3NF Table
Patient No. P10034 P10034 Patient No. P10034 Drug No. 10223 10334 Bed Number 84 84 Drug No. 10223 10334 Units Per Day Start Date 50 10 3/24/1998 3/24/1998 Finish Date 4/24/1998 4/17/1998
Patient Name Bed Number Robert MacDonald 84 Drug Name Morphine Tetracycline Ward No. Ward 11 Ward 11 Description Pain Killer Antibiotic Dosage 10mg/ml 0.5 mg/ml Method of Adim Oral IV Ward No. Ward 11 Ward 11 Ward Name Orthopaedic Orthopaedic
BCNF Table
There are no determinants that are not candidate keys, therefore the above tables are also in BCNF
A2
Staff No. Name Address Tel No. Position Shift Ward No. Ward Name Location Week beginning Charge Nurse Charge Nurse No. Tel Extn.
A3
Patient No.
Sex
Tel No.
DOB.
Date Reg.
Clinic No.
A4
Ward No. Ward Name Location Charge Nurse Charge Nurse No. Tel Extn. Patient No. Patient Name Date on Waiting List Expected Stay Date Placed Date Leave Actual Leave Bed Number
A5
Patient No. Patient Name Ward No. Ward Name Bed Number Drug No. Drug Name Description Dosage Method of Adim Units Per Day Start Date Finish Date