Вы находитесь на странице: 1из 7

A.

2 Ward Staff Allocation


Important Assumptions
There is a staff rotation. As to what this means is not exactly clear. It could mean that the staff changes wards from week to week (or within each week), it could mean that the staff changes shift from week to week, or it could mean they do both. The assumption made
influences how one choose primary keys and what comes next. I chose to assume the latter of the three options.
The charge nurse is unique from the regular staff.

Unnormalized Table 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

Staff No. Name Address Tel No. Position Shift Ward No. Ward Name Location Week beginning Charge Nurse Charge Nurse No. Tel Extn.
S123 Morgan Russell 23A George Street 01506-67676 Nurse Late
S098 Carol Cummings 15 High Street Edinburgh 0131-334-5677 Staff Nurse Late Ward 11 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. Staff Name Address Tel No. Position Shift Ward No. Week beginning
S098 Carol Cummings 15 High Street Edinburgh 0131-334-5677 Staff Nurse Late Ward 11 1/9/1998
S123 Morgan Russell 23A George Street 01506-67676 Nurse Late Ward 11 1/9/1998

Ward No. Ward Name Location Tel Extn. Charge Nurse Charge Nurse No.
Ward 11 Orthopaedic Block E 7711 Moira Samuel S011

OR either of these approaches is acceptable for removing repeating groups.

1NF Table
Staff No. Staff Name Address Tel No. Position Shift Ward No. Ward Name Location Week beginning Tel Extn. Charge Nurse Charge Nurse No.
S098 Carol Cummings 15 High Street Edinburgh 0131-334-5677 Staff Nurse Late Ward 11 Orthopaedic Block E 1/9/1998 7711 Moira Samuel S011
S123 Morgan Russell 23A George Street 01506-67676 Nurse Late Ward 11 Orthopaedic Block E 1/9/1998 7711 Moira Samuel S011

When moving from 1NF to 2NF you remove partial dependencies. Staff and Ward info are partially dependent on the PK

2NF Table
Staff No. Ward No. Week beginning Shift
S098 Ward 11 1/9/1998 Late
S123 Ward 11 1/9/1998 Late
The Shift is dependent on the StaffNo, WardNo, and Week beginning

Staff No. Staff Name Address Tel No. Position


S098 Carol Cummings 15 High Street Edinburgh 0131-334-5677 Staff Nurse
S123 Morgan Russell 23A George Street 01506-67676 Nurse

Ward No. Ward Name Location Tel Extn. Charge Nurse Charge Nurse No.
Ward 11 Orthopaedic Block E 7711 Moira Samuel S011

When moving from 2NF to 3NF one must remove transitive dependencies
A transitive dependency exists with the charge nurse information.

3NF Table
Staff No. Ward No. Week beginning Shift
S098 Ward 11 1/9/1998 Late
S123 Ward 11 1/9/1998 Late
There is a transitive dependency with Charge Nurse

Charge Nurse No. Charge Nurse


S011 Moira Samuel

Staff No. Staff Name Address Tel No. Position


S098 Carol Cummings 15 High Street Edinburgh 0131-334-5677 Staff Nurse
S123 Morgan Russell 23A George Street 01506-67676 Nurse

Ward No. Ward Name Location Tel Extn. Charge Nurse No.
Ward 11 Orthopaedic Block E 7711 S011

BCNF Table
There are no determinants that are not candidate keys, therefore the above tables are also in BCNF
A.3 Patient Registration Form
Important Assumptions
The NOK name will be uniquely tied to the patient no. (I.e., there is only one instance of the NOK for each patient).
The Dr. Name can be used to uniquely identify the clinic information. In addition, the patient ID can be used to identify the Dr. Name.

Unnormalized Table
Patient No. Patient First Name Patient Last Name Patient Address Sex Tel No. DOB. Marital Status Date Reg. N-O-K Name Relationship
P10234 Anne Phelps 44 North Bridges Cannonmills Edinburgh Female 0131-332-4111 ### Single 2/21/1995 James Phelps Father

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. Patient First Name Patient Last Name Patient Address Sex Tel No. DOB. Marital Status Date Reg. N-O-K Name Relationship
P10234 Anne Phelps 44 North Bridges Cannonmills Edinburgh Female 0131-332-4111 ### Single 2/21/1995 James Phelps 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. Patient First Name Patient Last Name Patient Address Sex Tel No. DOB. Marital Status Date Reg. N-O-K Name Relationship
P10234 Anne Phelps 44 North Bridges Cannonmills Edinburgh Female 0131-332-4111 ### Single 2/21/1995 James Phelps 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. Patient First Name Patient Last Name Patient Address Sex Tel No. DOB. Marital Status Date Reg. N-O-K Name Local Doctor's Name

P10234 Anne Phelps 44 North Bridges Cannonmills Edinburgh Female 0131-332-4111 ### Single 2/21/1995 James Phelps Dr. Helen Pearson

N-O-K Name Relationship Address Tel No.

James Phelps Father 145 Rowlands Street Paisley PA2 5FE 0141-848-2211

Local Doctor's Name Clinic No. Address Tel No.

Dr. Helen Pearson E102 22 Cannongate Way Edinburgh EH1 6TY 0131-332-0012

BCNF Table
There are no determinants that are not candidate keys, therefore the above tables are also in BCNF
N-O-K Address N-O-K Tel No. Local's Doctor's Name Clinic No. Doctor's Address Doctor's Tel No.
145 Rowlands Street Paisley PA2 5FE 0141-848-2211 Dr. Helen Pearson E102 22 Cannongate Way Edinburgh EH1 6TY 0131-332-0012

N-O-K Address N-O-K Tel No. Local's Doctor's Name Clinic No. Doctor's Address Doctor's Tel No.
145 Rowlands Street Paisley PA2 5FE 0141-848-2211 Dr. Helen Pearson E102 22 Cannongate Way Edinburgh EH1 6TY 0131-332-0012

N-O-K Address N-O-K Tel No. Local's Doctor's Name Clinic No. Doctor's Address Doctor's Tel No.
145 Rowlands Street Paisley PA2 5FE 0141-848-2211 Dr. Helen Pearson E102 22 Cannongate Way Edinburgh EH1 6TY 0131-332-0012
A.3 Patient Registration Form
Important Assumptions
We can also assume that the NOK relationship can only be determined through a combination of the Patient No. and NOK Name (e.g., what happens if two patients are admitted who have the same NOK?).
The Dr. Name can be used to uniquely identify the clinic information. In addition, the patient ID can be used to identify the Dr. Name.

Unnormalized Table
Patient No. Patient First Name Patient Last Name Patient Address Sex Tel No. DOB. Marital Status Date Reg. N-O-K Name Relationship N-O-K Address N-O-K Tel No. Local's Doctor's Name Clinic No. Doctor's Address Doctor's Tel No.
P10234 Anne Phelps 44 North Bridges Cannonmills Edinburgh Female 0131-332-4111 ### Single 2/21/1995 James Phelps Father 145 Rowlands Street Paisley PA2 5FE 0141-848-2211 Dr. Helen Pearson E102 22 Cannongate Way Edinburgh EH1 6TY 0131-332-0012

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. Patient First Name Patient Last Name Patient Address Sex Tel No. DOB. Marital Status Date Reg. N-O-K Name Relationship N-O-K Address N-O-K Tel No. Local's Doctor's Name Clinic No. Doctor's Address Doctor's Tel No.
P10234 Anne Phelps 44 North Bridges Cannonmills Edinburgh Female 0131-332-4111 ### Single 2/21/1995 James Phelps Father 145 Rowlands Street Paisley PA2 5FE 0141-848-2211 Dr. Helen Pearson E102 22 Cannongate Way Edinburgh EH1 6TY 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. N-O-K Name Relationship
P10234 James Phelps Father

N-O-K Name Address Tel No.


James Phelps 145 Rowlands Street0141-848-2211
Paisley PA2 5FE

Patient No. Patient First Name Patient Last Name Patient Address Sex Tel No. DOB. Marital Status Date Reg. Local Doctor's Name Clinic No. Address Tel No.
P10234 Anne Phelps 44 North Bridges Cannonmills Edinburgh Female 0131-332-4111 ### Single 2/21/1995 Dr. Helen Pearson E102 22 Cannongate Way Edinburgh EH1 6TY 0131-332-0012

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. N-O-K Name Relationship
P10234 James Phelps Father

N-O-K Name Address Tel No.


James Phelps 145 Rowlands Street0141-848-2211
Paisley PA2 5FE

Local Doctor's Name Clinic No. Address Tel No.


Dr. Helen Pearson E102 22 Cannongate Way Edinburgh EH1 6TY 0131-332-0012

Patient No. Patient First Name Patient Last Name Patient Address Sex Tel No. DOB. Marital Status Date Reg. Local Doctor's Name
P10234 Anne Phelps 44 North Bridges Cannonmills Edinburgh Female 0131-332-4111 ### 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
A.4 Patient Allocation Form
Important Assumptions
I assume that the Patient No. and Date placed in the hospital are both needed to uniquely identify each patient's stay (e.g., the date is needed so that multiple stays can be differentiated).
Date on waiting list and date leave may also be alternative components of the PK in stead of the Data Placed. I also assume that Bed # is a determinant for Ward information.

Unnormalized Table
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 LeaveBed Number
Ward 11 Orthopaedic Block E Moira Samuel S011 7711 P10451 Robert Drumtree
1/12/1998 5 1/12/1998 1/17/1998 84
P10480 Steven Parks 1/12/1998 4 1/14/1998 1/18/1998 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 Name Location Charge Nurse Charge Nurse No. Tel Extn.
Ward 11 Orthopaedic Block E Moira Samuel S011 7711

Patient No. Patient Name Date on Waiting List Expected Stay Date Placed Date Leave Actual Leave Bed Number Ward No.
P10451 Robert Drumtree 1/12/1998 5 1/12/1998 1/17/1998 84 Ward 11
P10480 Steven Parks 1/12/1998 4 1/14/1998 1/18/1998 79 Ward 11

OR either of these approaches is acceptable for removing repeating groups.


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 LeaveBed Number
Ward 11 Orthopaedic Block E Moira Samuel S011 7711 P10451 Robert Drumtree
1/12/1998 5 1/12/1998 1/17/1998 84
Ward 11 Orthopaedic Block E Moira Samuel S011 7711 P10480 Steven Parks 1/12/1998 4 1/14/1998 1/18/1998 79

2NF Table
To move a table to 2NF, we must remove partial dependencies. One partial dependency exists between patient name and patient no.

Patient No. Date on Waiting List


Expected Stay Date Placed Date Leave Actual Leave Bed Number Ward No. Ward Name Location Charge Nurse Charge NurseTel
No.Extn.
P10451 1/12/1998 5 1/12/1998 1/17/1998 84 Ward 11 Orthopaedic Block E Moira Samuel S011 7711
P10480 1/12/1998 4 1/14/1998 1/18/1998 79 Ward 11 Orthopaedic Block E Moira Samuel S011 7711

Patient No. Patient Name


P10451 Robert Drumtree
P10480 Steven Parks

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. Patient Name


P10451 Robert Drumtree
P10480 Steven Parks

Bed Number Ward No.


84 Ward 11
79 Ward 11

Ward No. Ward Name Location Charge Nurse No. Tel Extn.
Ward 11 Orthopaedic Block E S011 7711
Ward 11 Orthopaedic Block E S011 7711

Charge Nurse No. Charge Nurse


S011 Moira Samuel

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. Date on Waiting List


Expected Stay Date Placed Actual Leave Bed Number
P10451 1/12/1998 5 1/12/1998 84
P10480 1/12/1998 4 1/14/1998 79

Patient No. Patient Name


P10451 Robert Drumtree
P10480 Steven Parks

Bed Number Ward No.


84 Ward 11
79 Ward 11

Ward No. Ward Name Location Charge Nurse No. Tel Extn.
Ward 11 Orthopaedic Block E S011 7711
Ward 11 Orthopaedic Block E S011 7711

Charge Nurse No. Charge Nurse


S011 Moira Samuel

Date Placed Date Leave Expected Stay


1/12/1998 1/17/1998 5
1/14/1998 1/18/1998 4
A.5 Patient Medication Form
Important Assumptions
Patient No., Drug No., and Start Data are all needed to uniquely identify a record. This is because the patient can take many drugs, but he can also take each drug many times
The finish date could also be used as an alternative to start date in the PK
Bed no. and related information can be uniquely determined by the patient No. In addition, Bed # can be used to determine Ward Information.
The units per day are based on the patient taking the drug, the drug, and the start date of their treatment

Unnormalized Table
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
P10034 Robert MacDonald Ward 11 Orthopaedic 84 10223 Morphine Pain Killer 10mg/ml Oral 50 3/24/1998 4/24/1998
10334 Tetracycline Antibiotic 0.5 mg/ml 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. Patient Name Ward No. Ward Name Bed Number
P10034 Robert MacDonald Ward 11 Orthopaedic 84

Patient No. Drug No. Drug Name Description Dosage Method of Adin Units Per DayStart Date Finish Date
P10034 10223 Morphine Pain Killer 10mg/ml Oral 50 3/24/1998 4/24/1998
P10034 10334 Tetracycline Antibiotic 0.5 mg/ml IV 10 3/24/1998 4/17/1998

OR either of these approaches is acceptable for removing repeating groups.

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
P10034 Robert MacDonald Ward 11 Orthopaedic 84 10223 Morphine Pain Killer 10mg/ml Oral 50 3/24/1998 4/24/1998
P10034 Robert MacDonald Ward 11 Orthopaedic 84 10334 Tetracycline Antibiotic 0.5 mg/ml IV 10 3/24/1998 4/17/1998

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. Drug No. Units Per Day Start Date Finish Date
P10034 10223 50 3/24/1998 4/24/1998
P10034 10334 10 3/24/1998 4/17/1998

Patient No. Patient Name Ward No. Ward Name Bed Number
P10034 Robert MacDonald Ward 11 Orthopaedic 84

Drug No. Drug Name Description Dosage Method of Adim


10223 Morphine Pain Killer 10mg/ml Oral
10334 Tetracycline Antibiotic 0.5 mg/ml 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. Drug No. Units Per Day Start Date Finish Date

P10034 10223 50 3/24/1998 4/24/1998


P10034 10334 10 3/24/1998 4/17/1998

Patient No. Patient Name Bed Number


P10034 Robert MacDonald 84

Drug No. Drug Name Description Dosage Method of Adim


10223 Morphine Pain Killer 10mg/ml Oral
10334 Tetracycline Antibiotic 0.5 mg/ml IV

Bed Number Ward No. Ward No. Ward Name


84 Ward 11 Ward 11 Orthopaedic
84 Ward 11 Ward 11 Orthopaedic

BCNF Table
There are no determinants that are not candidate keys, therefore the above tables are also in BCNF
A2
Week Charge Charge
Staff No. Name Address Tel No. Position Shift Ward No. Ward Name Location beginning Nurse Nurse No. Tel Extn.

A3 This is based on the assumptions made for A3, not A3 Alternate


Local's
Patient First Patient Last Patient Marital N-O-K N-O-K Tel Doctor's Doctor's Doctor's Tel
Patient No. Name Name Address Sex Tel No. DOB. Status Date Reg. N-O-K Name Relationship Address No. Name Clinic No. Address No.

A4
Charge Charge Patient Date on Expected
Ward No. Ward Name Location Nurse Nurse No. Tel Extn. Patient No. Name Waiting List Stay Date Placed Date Leave Actual Leave Bed Number

A5
Patient Method of Units Per
Patient No. Name Ward No. Ward Name Bed Number Drug No. Drug Name Description Dosage Adim Day Start Date Finish Date