- · Description of a relationship where an instance of A is related to an instance of B, and the association can be moved to another instance of B. – Transferable
- · Description of a relationship where an instance of A is related to an instance of B, and the association cannot be moved to another instance of B - nontransferable
1. Draw ERDs for each of the following. Draw softboxes,
relationship lines, and labels for each relationship in both directions.
Indicate non-transferability when appropriate.
a. Each town may be the birthplace of many people. Each
person must be born in one and only one town.
assuming world has no
villages, only towns:
b. Each room may house one or more guests. Each guest may
stay in one and only one room.
c. Each employee must work for one and only one department.
Each department may have one or more employees.
d.
Each hotel may be the host of one or more guests. Each guest may be hosted in
one or more hotels. This one is tricky,
generally when a guest is hosted in a hotel, he stays there, if he change
hotel, previous hotel booking goes away, but here, problem says guest may
be hosted in multiple hotels
e. Each message must be addressed to one or more persons.
Each person may be the addressee of one or more messages. A message is addressed here, not sent, so it is still transferrable.
f. Each garment must have one and only one price. Each price
may be for one or more garments.
g. Each airline coupon must be used for one and only one
destination. Each destination may be visited with one or more coupons. A coupon is generated one destination, if
generated by mistake, new is reissued, so nontransferable here.
h. Each automobile must use one and only one tire size. Each
tire size may be used by one or more automobiles. Tire size of an automobile is defined by design, if the tire size need to be changed, means
the automobile will be recalled. And a new unit will be given. So it is
nontransferable.
i. Each child must have one and only one biological mother.
Each mother must be the parent of one or more children.
j. Each person must be of one and only one blood type. Each
blood type may classify one or more persons.
k. A person may be on one or more junk-mail lists. Each junk
list may contain one or more persons.
l. Each student may learn from one or more teachers. Each
teacher may educate one or more students.
m. Each school may be attended by one or more honor
students. Each honor student must attend one and only one school.
n. Each fingerprint must belong to one and only one person.
Each person must have one and only one fingerprint.
No comments:
Post a Comment