0% found this document useful (0 votes)
48 views3 pages

Lab1 FD Spring2023

The document describes two exercises involving normalizing data into relational databases. For the first exercise, the data is from a hospital test form and normalized to 1NF, 2NF and 3NF. For the second exercise, the data is from a student results form and also normalized to 1NF, 2NF and 3NF.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views3 pages

Lab1 FD Spring2023

The document describes two exercises involving normalizing data into relational databases. For the first exercise, the data is from a hospital test form and normalized to 1NF, 2NF and 3NF. For the second exercise, the data is from a student results form and also normalized to 1NF, 2NF and 3NF.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Lab 1

Normal forms
Exercise 1. You have been given a form which shows the details of tests done by different patients during
their visits to the hospital. In fact, when a patient goes to the hospital, he/she asks to be examined by a doctor of
a department. This doctor could ask him/her to do some tests and/or send him/her to another doctor of another
department. Then, the other doctor could also ask him/her to do other tests. A doctor belongs to only one
department. The Amount here is the remaining amount that the patient must pay for the test, after subtracting
the amount paid by the security social.

The hospital would like to set up a relational database corresponding to this form.

a. Normalize the database into 1NF including only one table. Give the content of the table as well
as the list of functional dependencies for the table.

b. Normalize the database into 2NF. Give the content of each table after as well as the list of
functional dependencies for each table after normalizing.

c. Normalize the database into 3NF. Give the content of each table after as well as the list of
functional dependencies for each table after normalizing.

P_ID: Patient’s ID
P_Name: Patient’s Name
D_ID: Doctor’s ID
D_Name: Doctor’s Name
DeptID: Department’s ID
DeptName: Department’s Name

Visit Time P_ID P_Name Phone D_ID D_Name DeptI DeptName TestI TestName Price Quantity Amount
ID D D
1 2019/12/23 298 Mary 0987654534 1002 Alan 101 Maternity T01 Diabetes Blood 15 3 40
09:10:00 Walls Smith Test
T02 2D 20 1 18
ultrasonography
1 2019/12/23 298 Mary 0987654534 1001 Jill Young 102 Gastroenterology T03 Anorectal function 30 1 30
09:10:00 Walls testing
2 2019/12/23 300 Bob 0896755888 1001 Jill Young 102 Gastroenterology T03 Anorectal function 30 1 30
10:30:00 Jackson testing
T04 24-hour pH 45 2 90
monitoring
3 2019/12/23 3008 Peter 0675389799 1003 Mary 102 Gastroenterology T01 Diabetes Blood 15 2 30
10:30:00 Smith Weber Test
T05 Capsule endoscopy 150 1 120
4 2019/12/27 298 Mary 0987654534 1003 Mary 102 Gastroenterology T04 24-hour pH 45 1 37
14:30:00 Walls Weber monitoring
Exercise 2: Having the following form to input the results of students:
Roll# Name Birthdate Class Department CourseID CourseName Credits Results

Exercise# %Note Note

HE130257 Nguyen 2000-05-28 SE1311 SE DBI202 Introduction to 3 1 20 6


Thi Database
Binh

HE130257 Nguyen 2000-05-28 SE1311 SE DBI202 Introduction to 3 2 40 5


Thi Database
Binh

HE130257 Nguyen 2000-05-28 SE1311 SE DBI202 Introduction to 3 3 40 8


Thi Database
Binh

HE130246 Nguyen 2000-09-13 SE1311 SE DBI202 Introduction to 3 1 20 4


Minh Database
Chien

HE130246 Nguyen 2000-09-13 SE1311 SE DBI202 Introduction to 3 2 40 3


Minh Database
Chien

HE130246 Nguyen 2000-09-13 SE1311 SE DBI202 Introduction to 3 3 40 5


Minh Database
Chien

HE130246 Nguyen 2000-09-13 SE1311 SE CSI101 Connecting to 3 1 15 2


Minh Computer
Chien Sciences

HE130246 Nguyen 2000-09-13 SE1311 SE CSI101 Connecting to 3 2 20 4


Minh Computer
Chien Sciences

HE130246 Nguyen 2000-09-13 SE1311 SE CSI101 Connecting to 3 3 30 3


Minh Computer
Chien Sciences

HE130246 Nguyen 2000-09-13 SE1311 SE CSI101 Connecting to 3 4 35 6


Minh Computer
Chien Sciences

HE130258 Nguyen 2000-08-14 IA1301 IA CSI101 Connecting to 3 1 15 4


Binh Computer
Minh Sciences

HE130258 Nguyen 2000-08-14 IA1301 IA CSI101 Connecting to 3 2 20 6


Binh Computer
Minh Sciences

HE130258 Nguyen 2000-08-14 IA1301 IA CSI101 Connecting to 3 3 30 4


Binh Computer
Minh Sciences

HE130258 Nguyen 2000-08-14 IA1301 IA CSI101 Connecting to 3 4 35 8


Binh Computer
Minh Sciences
The university would like to set up a relational database corresponding to this form.

a. Normalize the database into 1NF including only one table. Give the content of the table as well
as the list of functional dependencies for the table.

b. Normalize the database into 2NF. Give the content of each table after as well as the list of
functional dependencies for each table after normalizing.

c. Normalize the database into 3NF. Give the content of each table after as well as the list of
functional dependencies for each table after normalizing.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy