Title: Cars as Entities Objects
1Cars as Entities (Objects)
2Teachers as Entities (Roles/People)
3Classes as Entities (Events)
4Entity type Car
Instances in the entity set
Attributes of the entity type
Vehicle Identification Number Manufacturer Model C
olor Passenger capacity
5Attributes of Car Entity Type
VIN
Model
CAR
Make
Color
Owner
6Sample Relationship
7Cardinality
1 1
1 N
M N
8Mandatory vs. Optional Relationships
Mandatory participation by both entities
Optional participation by both entities
9Mandatory vs. Optional Relationships
Mandatory participation by PILOT entity
Mandatory participation by FLIGHT entity
10Example ER DiagramChen, 1976
11Sample problem
A person can own any number of vehicles. Each
vehicle is of a given make. It is registered in
any one of a number of states. A registration
number and registration termination date are
of interest, and so is the address of a
registration office in each state.
12Sample problem
A trucking company called TRUCKERS is responsible
for picking up shipments for warehouses of a
retail chain called MAZE BROTHERS and delivering
the shipment to individual retail store locations
of MAZE BROTHERS. Currently there are 6
warehouse locations and 45 retail stores of MAZE
BROTHERS. A truck may carry several shipments
during a single trip, which is identified by a
trip number, and delivers those shipments to
multiple stores. Each shipment is identified by
a shipment number and includes data on shipment
volume, weight, destination, etc. Trucks have
different capacities for both the volumes they
can hold and the weights they can carry. The
TRUCKERS company currently has 150 trucks, and a
truck makes 3 to 4 trips each week. A database
to be used by both TRUCKERS and MAZE BROTHERS
is being designed to keep track of truck usage
and deliveries and to be used for scheduling
trucks to provide timely deliveries to stores.
(Reprinted from Elmasri Navathe, 1989, Problem
3.21)