- A grid-like drawing that can be used to discover and record relationships between entities in an entity- relationship model - matrix diagram
1.
Read the business scenario and review the ERD.
Using the matrix diagram, make up two or more possible relationships between
PHOTOGRAPH and the other entities that make sense for the business.
Scenario:
“I’m an amateur photographer. I own several cameras and am
always taking pictures of different subjects. I’m trying to keep track of which
camera and type of film perform best under certain conditions—indoor light,
outdoor light, etc.—so when I have my films developed, I note down which camera
I used. When the pictures come back, I note the subject and conditions. Each
picture always features one subject. A subject could be a view, a person or
group of persons, or an object or group of objects.”
Two possible relationships are:
|
CAMERA
|
PHOTOGRAPH
|
SUBJECT
|
CAMERA
|
|
Used to take with
|
|
PHOTOGRAPH
|
Taken with
|
|
of
|
SUBJECT
|
|
Featured in
|
|
2. Complete the matrix diagram below, and construct an ERD
from it.
|
Runner
|
City For Race
|
Race Type
|
Running Event
|
Runner
|
|
visits
|
chooses
|
attends
|
City For Race
|
visited by
|
|
|
hosts
|
Race Type
|
Chosen by
|
|
|
Contained in
|
Running Event
|
Attended by
|
Happens in
|
contains
|
|
1.
City of race must be visited by many runners,
otherwise there is no race and hence, it’s not a city of race. Runner may visit
multiple city of race since he is very enthusiastic.
2.
RaceType must be chosen by many runners
otherwise, racetype will be dropped from the event. Runner may wish to pick up
multiple RaceTypes , he may be
versatile.
3.
Event must be attended by multiple runners or
there is no event. Runner may choose to attend multiple events.
4.
City of race must host running event/events or
else it’s not a city of race. An event must happen in a city.
5.
RUNNING event must have one or more race types,
runner won’t pay baseball in running event, will they run small or big
distances. A racetype may be present in multiple events happening around.
No comments:
Post a Comment