Dbms Assignment Solution
Dbms Assignment Solution
K staffNo, patientNo
Second Normal Form (2NF) In 2NF we check and remove partial functional dependency: fd1: fd2: fd3: staffNo, patientNo: [dentistName, patientName, appointment, surgeryNo] (partially dependent) staffNo: patientNo: [ dentistName, appointment, surgeryNo [ patientName ] ] (fully dependent) (fully dependent)
After checking partial dependencies it is understood that above table is in First Normal Form but not in Second Normal Form because there are partial dependencies of columns on primary key. dentistName, appointment, surgeryNo are dependent on staffNo and patientName is only dependent on patientNo. To reduc e table in Second Normal Form we will split it in following two tables:-
Staff staffNo S1011 S1011 S1024 S1024 S1032 S1032 Patient patientNo P100 P105 P108 P108 P105 P110 dentistName Tony Smith Tony Smith Helen Pearson Helen Pearson Robin Plevin Robin Plevin appointment date 12-Aug-03 13-Aug-03 12-Sep-03 14-Sep-03 14-Oct-03 15-Oct-03 time 10:00 12:00 10:00 10:00 16:30 18:00 surgeryNo S10 S15 S10 S10 S15 S13
patientName Gillian White Jill Bell Ian Mackay Ian Mackay Jill Bell John Walker
Third Normal Form (3NF) In 3NF we check and remove Transitive Dependency that any non -key attributes should not be dependent on another no-key attribute. In Staff Table a non-key attribute surgeryNo is dependent on another non-key attribute appointment; therefore, the Staff Table will be split into further two tables:
Appointments dentistName Tony Smith Tony Smith Helen Pearson Helen Pearson Robin Plevin Robin Plevin appointment date 12-Aug-03 13-Aug-03 12-Sep-03 14-Sep-03 14-Oct-03 15-Oct-03 time 10:00 12:00 10:00 10:00 16:30 18:00 surgeryNo S10 S15 S10 S10 S15 S13
patientName Gillian White Jill Bell Ian Mackay Ian Mackay Jill Bell John Walker