You are on page 1of 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
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

Charge Nurse No. Tel Extn.

Carol Cummings 15 High Street Edinburgh 0131-334-5677

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

either of these approaches is acceptable for removing repeating groups.

Staff Name

Address

Tel No.

Position Staff Nurse Nurse

Shift Late Late

Ward No. Ward 11 Ward 11

Ward Name Orthopaedic Orthopaedic

Location Block E Block E

Week beginning 1/9/1998 1/9/1998

Tel Extn. 7711 7711

Charge Nurse Moira Samuel Moira Samuel

Charge Nurse No. S011 S011

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

The Shift is dependent on the StaffNo, WardNo, and Week beginning

Staff No. S098 S123

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

Ward No. Ward 11

Ward Name Orthopaedic

Location Block E

Tel Extn. 7711

Charge Nurse Moira Samuel

Charge Nurse No. 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. S098 S123 Ward No. Ward 11 Ward 11 Week beginning 1/9/1998 1/9/1998 Shift Late Late

There is a transitive dependency with Charge Nurse

Charge Nurse No. S011 Staff No. S098 S123

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

Ward No. Ward 11

Ward Name Orthopaedic

Location Block E

Tel Extn. 7711

Charge Nurse No. 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. 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

44 North Bridges Cannonmills Edinburgh Female 0131-332-4111

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

44 North Bridges Cannonmills Edinburgh Female 0131-332-4111

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

44 North Bridges Cannonmills Edinburgh Female 0131-332-4111

N-O-K Name James Phelps

Relationship Father

Address 145 Rowlands Street Paisley PA2 5FE

Tel No. 0141-848-2211

Local Doctor's Name Clinic No. Dr. Helen Pearson E102

Address 22 Cannongate Way Edinburgh EH1 6TY

Tel No. 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 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

0141-848-2211 Dr. Helen Pearson

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

0141-848-2211 Dr. Helen Pearson

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

0141-848-2211 Dr. Helen Pearson

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

Female 0131-332-4111 ###

0141-848-2211 Dr. Helen Pearson

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

N-O-K Name James Phelps

Address

Tel No.

145 Rowlands Street0141-848-2211 Paisley PA2 5FE

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. Local Doctor's Name Clinic No. Single 2/21/1995 Dr. Helen Pearson E102

Address

Tel No.

Female 0131-332-4111 ###

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

N-O-K Name James Phelps

Address

Tel No.

145 Rowlands Street0141-848-2211 Paisley PA2 5FE

Local Doctor's Name Clinic No. Dr. Helen Pearson E102

Address

Tel No.

22 Cannongate Way Edinburgh EH1 6TY 0131-332-0012

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. Local Doctor's Name Single 2/21/1995 Dr. Helen Pearson

Female 0131-332-4111 ###

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 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 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 Leave Bed Number Ward No. 84 Ward 11 79 Ward 11

OR
Ward No. Ward 11 Ward 11

either of these approaches is acceptable for removing repeating groups.


Ward Name Orthopaedic Orthopaedic Location Block E Block E Charge Nurse Moira Samuel Moira Samuel Charge Nurse No. Tel Extn. S011 7711 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

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. P10451 P10480 Patient No. P10451 P10480

Date on Waiting List Expected Stay 1/12/1998 5 1/12/1998 4 Patient Name Robert Drumtree Steven Parks

Date Placed 1/12/1998 1/14/1998

Date Leave 1/17/1998 1/18/1998

Actual Leave

Bed Number Ward No. 84 Ward 11 79 Ward 11

Ward Name Orthopaedic Orthopaedic

Location Block E Block E

Charge Nurse Moira Samuel Moira Samuel

Charge NurseTel Extn. No. S011 7711 S011 7711

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

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

Patient No. P10034 P10034

Drug No. 10223 10334

Drug Name Description Morphine Pain Killer Tetracycline Antibiotic

Dosage 10mg/ml 0.5 mg/ml

Method of Adin Units Per Day Start Date Oral 50 3/24/1998 IV 10 3/24/1998

Finish Date 4/24/1998 4/17/1998

OR
Patient No. P10034 P10034

either of these approaches is acceptable for removing repeating groups.


Patient Name Ward No. Robert MacDonald Ward 11 Robert MacDonald Ward 11 Ward Name Bed Number Orthopaedic 84 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 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

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


Patient First Patient Last Name Name Patient Address Marital Status N-O-K Address N-O-K Tel No. Local's Doctor's Name Doctor's Address Doctor's Tel No.

Patient No.

Sex

Tel No.

DOB.

Date Reg.

N-O-K Name Relationship

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

You might also like