07 02 2025 Lab2 FD
07 02 2025 Lab2 FD
Exercise 1. You have been given a form which shows the details of technical jobs carried out
for different schools by members of staff in the local college. You will note that one job may
require input from more than one member of staff. Each member of staff belongs to a department
within the college and the number of hours worked on each job along with the date the job was
undertaken are noted. A member of staff may work on more than one job on any given date.
The college would like to set up a relational database to manage the allocation of staff to jobs
and keep a more efficient record of the number of hours worked for each school within the
college.
Your task is making the database to 3NF (specify step by step: determine FDs, normalization,..).
345 Smith, Alan 2 Helpdesk 3440 18/9/07 346 Bus & Man 1.5
320 Young, Jill 3 Labs 3440 18/9/07 346 Bus & Man 4
Exercise 2. Based on the form below, design a database suitable for storing information.
(Name of counseling center)
(Code: ….)
Result
Test
Name of Registrant
Sex
Name of counselor
Code of counselor
Code of Registrant
Registration time
Referral Service
Start time of
consultation
Negative
Positive
Female
Male
Date
Age
Yes
No
No
Exercise 1:
1. Tech Table:
TechNo TechName
2. Dept Table:
DeptId Department
1 Engineering
2 Helpdesk
3 Labs
3. Job Table:
4. School Table:
SchoolID School
192 Beauty
125 Computing
560 Design
5. Hoursworked Table:
345 2 1002 3
345 2 1480 3
380 3 3670 4
380 3 3440 2
300 2 1450 1
300 2 1480 3
320 3 3440 4
320 3 3670 2
Exercise 2:
Bước 1 : Thực hiện NF1: Normalize columns : sex , test , result There are 2 unnecessary columns so
convert them into 1 single column sex(Male/Female) , test(Yes/No), Result(Positive,Negative) :
- No -> Date, Code of Registrant, Registration time, Start time of consultation, test , result.
Bước 3: NF3
- Tách test -> result sang 1 bảng khác vì result chỉ phụ thuộc vào test
o No -> test
Bảng 1 : No -> Date, Code of Registrant, Registration time, Start time of consultation, Code of
counselor.
Bảng 4: ,No , Code of counselor -> No, code of referral services (cả 2 có thể xác định lẫn nhau và
chỉ toán giá trị unique)