You are on page 1of 3

Example 1

a) Conceptual Design
i) Entities and their attributes

Department{deptNumber, deptName, deptPhone}


deptNumber, deptName, deptPhone – unique

Project{projNumber, projName, budget, startDate, finishDate }


projNumber, projName – unique;

Employee{nin, name(fName, lName), address(town, street, postcode), sex, birthdate, salary,


qualifications }
nin – unique
name, address – composite
qualifications – multi-value
age – derived attribute

Dependent{fName, sex, birthdate, relationship}


Weak entity; fName – partial primary key

ii) Relationships and their attributes (if any)

Manages {(Staff, Department)}; Attribute: startDate


 Not every employee (min: 0) manages a department but can manage at most one
branch (max: 1);
 Each department (min: 1) is managed by only one employee (max: 1)
 Cardinality ratio: one-to-many (1:1)

Employs {(Department, Staff)};


 Each department (min: 1) employs many employees (max:*)
 Each employee (min: 1) is employed by one department (max: 1);
 Cardinality ratio: one-to-many (1:*).

Controls {(Department, Project)}.


 Not every department (min: 0) control projects, but may control many (max: *).
 Every project (min:1) is controlled by one department (max: 1)
 Cardinality ratio: one-to-many (1:*).

WorksOn{(Employee, Project)}; Attribute: hours


 Each employee (min: 1) works on many projects (max: *).
 Each project (min: 1) has more than one employee working on it (max: *).

1
 Cardinality ratio: one-to-many (1:*).

Has ((Employee, Dependent)};


 Not every employee(min:0) has many (max: *) dependents
 Each dependent (min: 1) is the dependent of one employee (max: 1)
 Cardinality ratio: one-to-many (1:*)

Supervise {(Employee (Supervisor), Employee (Supervisee)};


 An employee may supervise (min: 0) many other employees (max:*)
 Not every employee (min: 0) is supervised but may be supervised by one employee
only (max:1)
 Cardinality ratio: many-to-many (1:*)

iii) Conceptual Schema

 Partial ER Diagrams

Employee Department Project


nin {PK} deptNumber {PK}
projNumber {PK}
name deptName {AK}
projName {AK}
fName deptPhone {AK} budget
lName
startDate
address
endDate
city
street
postcode Dependent
sex
fName {PPK}
salary
birthDate sex
qualifications {1..*} birthdate
/age relationship

PK – Primary Key
AK – Alternate Key
PPK – Partial Primary Key

2
 Simplified ER diagram

Controls

Supervisee
0..*
Supervise
Employee
Supervisor
0..* 1..1
0..1
nin Employs Department
Project
1..* 1..1
WorksOn deptNumber
projNumber Manages
0..* 1..*
1..1 0..1
hours 1..1
startDate

Has

0..*
Dependent

firstName

You might also like