0% found this document useful (0 votes)
169 views

Dbms Assignment Solution

The document describes the process of normalizing a database table from 1NF to 3NF. It starts with a composite primary key table in 1NF and identifies partial dependencies that require splitting into two tables to satisfy 2NF. One table contains staff and appointment details while the other contains patient names. To achieve 3NF, the staff table is further split to remove transitive dependency of surgery number on appointment details. The result is three normalized tables in 3NF.

Uploaded by

Usman Zulfiqar
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
169 views

Dbms Assignment Solution

The document describes the process of normalizing a database table from 1NF to 3NF. It starts with a composite primary key table in 1NF and identifies partial dependencies that require splitting into two tables to satisfy 2NF. One table contains staff and appointment details while the other contains patient names. To achieve 3NF, the staff table is further split to remove transitive dependency of surgery number on appointment details. The result is three normalized tables in 3NF.

Uploaded by

Usman Zulfiqar
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Solution First Normal Form (1NF) staffNo, patientNo C.K appointment Composit P.

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:

Staff staffNo S1011 S1011 S1024 S1024 S1032 S1032

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

Patient patientNo P100 P105 P108 P108 P105 P110

patientName Gillian White Jill Bell Ian Mackay Ian Mackay Jill Bell John Walker

Now the Hospital Data Base is in Third Normal Form (3NF)

You might also like