0% found this document useful (0 votes)
31 views5 pages

DBDM Exno-8

Dbdm lab

Uploaded by

rsaraswathiit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views5 pages

DBDM Exno-8

Dbdm lab

Uploaded by

rsaraswathiit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

EX.

NO:8 DATABASE DESIGN USING NORMALIZATION- BOTTOM UP


APPROACH

AIM

To design a database using normalization using bottom up approach

ALGORITHM

STEP 1:Start with a table containing anomalies

STEP 2: In bottom up approach the attributes and data of the table is already given

STEP 3: Using the normalization technique remove the anomalies one by one

STEP 4: Use the 1NF to 5NF for normalization if required

STEP 5: Stop normalizing when the anomalies are removed

DATABASE DESIGN

(a) The table shown in Figure 1 is susceptible to update anomalies. Provide examples of insertion,
deletion, and modification anomalies.
(b) Describe and illustrate the process of normalizing the table shown in Figure 1 to 3NF. State any
assumptions you make about the data shown in this table.

Assumptions made include that a patient is registered at only one surgery and he/she may have more
than one appointment on a given day. All the schedules have been fixed for the whole days and
week.
In the 1NF we remove all the repeating groups (appointment), assigning new column (apptDate and
apptTime) and assigned primary keys (candidate keys). Then we figure out the functional
dependencies (FDs). By using dependency diagram we represent the table as shown below. (NF –
stand for Normal Form)

FD1

staffNo patientNo patientName surgeryNo


apptDate apptTime dentistName

FD2 FD3

FD4

FD5
The 2NF, it is already in 1NF and there is no partial dependency. So we need to remove the FD2
and FD4 by splitting into new tables and at the same time creating foreign keys. The new tables that
are in 2NF are shown below.

staffNo apptDate apptTime patientNo patientName

staffNo apptDate surgeryNo

staffNo dentistName

FD1 is already in 2NF. In this case, we can see that FD2 (just depend on staffNo) and FD4 (just
depend on staffNo and apptDate) violate the 2NF. These two NFs are partially dependent on the
candidate keys not the whole keys. FD2 can stand on its own by depending on the staffNo and
meanwhile FD4 also can stand on its own by depending on the staffNo.
The FD3 violates the 3NF showing the transitive dependency where surgeryNo and patientName
depend on patientNo while patientNo depend on the staffNo that is the non-key is depending on
another non-key.
Finally in 3NF we must remove the transitive dependency. In this case we remove the FD3 by
splitting into a new table. The transitive dependency left is the patientName that depend on the
patientNo, so we split this into new table while creating a foreign key.

FK
staffNo apptDate apptTime patientNo

FK

staffNo apptDate surgeryNo

staffNo dentistName

patientNo patientName

Let re-arrange and giving names to the tables.


staffNo dentistName

Dentist(staffNo, dentistName)

FK
staffNo apptDate surgeryNo

Surgery(staffNo, apptDate, surgeryNo)

patientNo patientName

Patient(patientNo, patientName)

FK
staffNo apptDate apptTime patientNo

Appointment(staffNo, apptDate, apptTime, patientNo)

RESULT
Thus the creation of database using bottom up approach was implemented and executed
successfully.

You might also like