Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
DesigninganERDbasedon
scenarios
Lesson Outcomes
At the completion of this lesson, students should be
able to:
(1) extract ERD components from a given database
scenario
(2) draw an ERD based on a given database scenario
(2) suggest the appropriate data/information that a
company could store in its database
Entity2
Entity3
Entity4
Entity1
Entity2
Entity3
Entity4
Fill in cell with verb if the row and column entities have
relationship with each other
Entity1
Entity1
Entity2
Entity3
owns
Entity2
has
Entity3
produces
Entity4
Entity4
takes
gives
Sample Exercise 1
Draw an ERD to represent the database for the following
MAIL_ORDER database in which employees take orders for parts
from customers. The data requirements are summarized as follows:
The mail order company has employees, each identified by a unique employee
number, first and last name, and ZIP code.
Each customer of the company is identified by a unique customer number, first
and last name, and ZIP code.
Each part sold by the company is identified by a unique part number, a part
name, price, and quantity in stock.
Each order placed by a customer is taken by an employee and is given a
unique order number. Each order contains specified quantities of one or more
parts. Each order has a date of receipt as well as an expected ship date. The
actual ship date is also recorded.
Sample Exercise 2
Draw an ERD to represent the database for the following
scenario:
A company has several departments. Each department has
a supervisor and at least one employee. Employees must be
assigned to at least one, but possibly more departments. At
least one employee is assigned to a project, but an
employee may be on vacation and not assigned to any
projects. The important data fields are the names of the
departments, projects, supervisors and employees, as well
as the supervisor and employee number and a unique
project number.
10
Sample Exercise 3
Suggest the entities, attributes and relationships which might
be applicable for a bus company database.
Draw the ERD to represent your suggestion.
11
Sample Exercise 4
Draw an ERD to represent a database which can be used to
store information on the coming world cup soccer
championship.
12
Sample Exercise 5
13
14