Professional Documents
Culture Documents
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
ANSWERS:
Exercise 1:
We’re working with a table, which shows the details of technical jobs carried out for different
schools by members of staff in the local college: technicians’ numbers, technicians’ names,
departments ID, the departments, jobs’ numbers, dates, colleges ID, the colleges, and numbers
of hours worked. The table is in the first normal form since all column values are atomic.
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
345 1002 3
345 1480 3
380 3670 4
380 3440 2
300 1450 1
300 1480 3
320 3440 4
320 3670 2
o Relationships:
- JobNo (JOB AND SCHOOL TABLE) -> JobNo (HOURS WORK TABLE): 1 -> n.
380 Jackson, 3
Bob
DeptId Department
1 Engineering
2 Helpdesk
3 Labs
JOB AND SCHOOL TABLE (key = JobNo)
SchoolID School
192 Beauty
125 Computing
560 Design
345 1002 3
345 1480 3
380 3670 4
380 3440 2
300 1450 1
300 1480 3
320 3440 4
320 3670 2
o Relationships:
- JobNo (JOB AND SCHOOL TABLE) -> JobNo (HOURS WORK TABLE): 1 -> n.
- SchoolID (SCHOOL TABLE) -> SchoolID (JOB AND SCHOOL TABLE): 1 -> n.
Exercise 2:
(Code: ….)
Sex
Name of counselor
Code of Registrant
Code of counselor
Registration time
Referral Service
Start time of
consultation
Negative
Positive
Female
Male
Date
Age
Yes
No
No
Start by gathering any existing data that will be included in the database. Then list the types of
data you want to store and the entities:
REGISTRANT:
- Code of Registrant
- Name of Registrant
- Age
- Sex
CONSULTATION:
- Date
- Registration time
- Test
- Result
- Referral Service
COUNSELOR:
- Name of counselor
- Code of counselor
Entity-relationship diagram: