Lab2 FD Summer 2019
Lab2 FD Summer 2019
Lab2 FD Summer 2019
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.
b. Assume that at the beginning, the database contain only one relation R(TechNo,
TechName, DeptID, Department, JobNo, Date, SchoolID, School, Hoursworked).
Normalize the database to 1NF, 2NF and 3NF (specify your responses step by
step, not only give the results).
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
Emergency Contact:
In each visit, the patient may be consulted by a main doctor who after may require him/her to do some
tests/consultations and gives him/her a list of medicines to take. Note that each test is done by a doctor
and different tests could be done by different doctors. The information of the tests/consultations and
medicines is as follows:
No Date Time Code Name Price Discount Result Code Name of Indication
of test of test of Doctor
Doctor
No Code of Name of Unit Quantity Unit Amount Indication Code Name
medicine medicine Price of of
Doctor Doctor
300 employees of a company are organized into different departments. For each employee, we
have his social security number, name, address, sex, birthdate, phone and email. Each department
has a name, a role and a head (who is also an employee). Note that each employee works for
only one department at a time, but he could change from one department to another department.
Each time he works for a department, the company signs a contract specifying his salary, start
date and end date. Each department handles several projects (each project is handled by only one
department). Each project has a name, start date, end date, a project manager and a number of
employees who work on it. Note that an employee could work on different projects with a
specified number of hours. Each employee may have several dependents. For each dependent,
we keep track of their name, sex, birthdate and relationship to the employee.
A hardware store sells several home workshop products to the public (such as power saws and
sanders). Each product has several different manufacturers who manufacture it, and prices are
different for products made by different manufacturers. Each time one or more products are sold
to a customer, an invoice is created which lists the date, items purchased and their prices, and
then the total purchase and tax amounts.