You are on page 1of 3

Lab 3

Exercise 1. Convert the following Relationship to Relation Data Model

ID Mana
ge

Nam
EMPLOYEES
e
Q6:
EMPLOYEES ( ID, Name )
EMPLOYEES ( ID, ManageID, Name )

Flight# Date From Code Name

FLIGHTS LOCATIONS
To

Q5:
FLIGHTS ( Flight#, Date, CodeLocationFrom, CodeLocationTo )
LOCATIONS ( Code, Name )

ID Nam Code Nam


e e

Proces
EMPLOYEES PRODUCTS
s
Q3:
EMPLOYEES ( ID, Name )
PRODUCTS ( Code, Name, ID )

ID Nam Date Code Nam


e e Price

Sale
EMPLOYEES PRODUCTS

Q3:
EMPLOYEES ( ID, Name )
PRODUCTS ( Code, Name, Price, Date, ID )

This study source was downloaded by 100000847779577 from CourseHero.com on 06-05-2022 23:29:08 GMT -05:00

https://www.coursehero.com/file/33882522/Lab3-TanHuynhDangdoc/
EmployeeID Nam Code Name
e
Quantit
y

Sale
EMPLOYEE PRODUCT

CustomerID
CUSTOMER
Name

Q1:
EMPLOYEES ( EmployeeID, Name )
CUSTOMER ( CustomerID, Name )
PRODUCTS ( Code, Name )
Q3:
Sale ( EmployeeID, CustomerID, Code, Quantity )

Speciality Code Nam


e

IS
TEACHER PERSON
A

IS
STUDENT
A

specify the type that you use


Class

Q7:
PERSON ( Code, Name )
TEACHER ( Code, Name, Speciality )
STUDENT ( Code, Name, Class )

Exercise 2. ABC Consulting is a small-sized consulting firm in the IT industry. ABC’s business is
managing several Systems Development projects by assigning staff consultants to these projects as their
skills are needed. Each employee is designated to have one primary skill, but there may be other employees

This study source was downloaded by 100000847779577 from CourseHero.com on 06-05-2022 23:29:08 GMT -05:00

https://www.coursehero.com/file/33882522/Lab3-TanHuynhDangdoc/
with the same primary skill. A consultant may work on one or more projects, or may not yet be assigned to a
project.

The company charges for each project by billing each consultant's hours worked by the billing rate. The
hourly billing rate is dependent on the employee’s primary job skill.

Draw ER model for the problem (add the attributes that you deem necessary for each entity in the model).
Then, convert this model to Relation data model.

BillRate ProjectI Name Time


SkillID Name
s D

PROJECT
SKILL

SALARY Workhour EMPLOYEES


SkillID Name
s

ProjectID
EmployeeID Phone

SKILL ( SkillID, Name, BillRates )

PROJECT ( ProjectID, Name, Time )

SALARY ( SkillID, ProjectID, Workhours )

EMPLOYEES ( EmployeeID, Name, Phone )

This study source was downloaded by 100000847779577 from CourseHero.com on 06-05-2022 23:29:08 GMT -05:00

https://www.coursehero.com/file/33882522/Lab3-TanHuynhDangdoc/
Powered by TCPDF (www.tcpdf.org)

You might also like