INDIVIDUAL ASSIGNMENT
QUESTION 1
Create an ER-model for a customer database for the marketing department of a cooperation
based on the following requirements:
Persons are identified by a combination of their first name, last name, and date of
birth. A person can have a number of titles (E.g., Prof. Dr. Henry Dube).
For cooperation we record the sector (e.g., IT) and a unique name.
Persons work for one or more cooperation. For each relation between a person and a
cooperation we record a job title. We allow cooperation in our database to not have
any associated employees.
Addresses consist of a street, street number, city, and a unique Id. A person can be
associated with a number of addresses and multiple persons can live at the same
address. A cooperation is associated with one or more addresses. No two cooperation
share the same address. Some addresses in the database may not be associated with
any cooperation or person.
Phone contacts consists of a type (e.g., home or work) and are uniquely identified by a
combination of area code and number (e.g., 312 and 123456). Each person is
associated with at least one phone contact. Each phone belongs to exactly one person.
Some, but not all phone contacts are associated with an address. We allow multiple
phone numbers for the same address.
An email address consists of a unique address string (e.g., mpofu.s@[Link]).
Each email address has one owner (a person), but not all persons have an email
address. We do not record multiple email addresses per person.
[25]
QUESTION 2
An engineering consultancy firm supplies temporary specialised staff to bigger companies in
the country to work on their project for certain amount of time. The table below lists the time
spent by each of the company’s employees at other companies to carry out projects. The
National Insurance Number (NIN) is unique for every member of staff.
NIN Contract Hours Employee Company Company
Number Name ID Location
616681B SC1025 72 P. Moyo SC115 Bulawayo
674315A SC1025 48 R. Pedzisa SC115 Bulawayo
323113B SC1026 24 P. Gomba SC23 Harare
616681B SC1026 24 P. Moyo SC23 Harare
a) Explain in which normal form this table is [2]
b) Find the Primary Key for this relation and explain your choice. [2]
c) Find the Fully Functional Dependencies on the PK and the Partial Dependencies on
the PK. [4]
d) Normalise the table to 2NF [5]
e) Find the transitive dependencies on the 2NF tables [3]
f) Normalise the tables to 3NF – Express the tables in DBML language and show the PK
and FK in all the relations. [9]