Databases Reference
In-Depth Information
(a) Salespersons and customers
Salesperson 137
Customer 0839
Salesperson 204
Customer 1826
(b) Customers and products
Customer 0839
Product 19440
Customer 1826
Product 24013
(c) Salespersons and products
Salesperson 137
Product 19440
F IGURE 6.10
Ternary relationship counter-example
Salesperson 204
Product 24013
Again, consider salespersons, customers, and products. You might know that
a particular salesperson has made sales to a particular customer. You might also
know that a particular salesperson has sold certain products at one time or another.
And,you might know that a particular customer has bought certain products. But all
of that is not the same thing as knowing that a particular salesperson sold a particular
product to a particular customer. Still skeptical? Look at Figure 6.10. Parts a, b, and
c of the figure clearly illustrate three many-to-many relationships. They are between
(a) salespersons and customers, (b) customers and products, and (c) salespersons
and products. Part a shows, among other things, that salesperson 137 sold something
to customer 0839. Part b shows that customer 0839 bought product 19440. Does that
mean that we can infer that salesperson 137 sold product 19440 to customer 0839?
No! That's a possibility and, indeed, part c of the figure shows that salesperson 137
did sell product 19440. But part c of the figure also shows that salesperson 204
sold product 19440. Is it possible that salesperson 204 sold it to customer 0839?
According to part a, salesperson 204 sold something to customer 0839, but it doesn't
indicate what. You can go around and around Figure 6.10 and never conclude with
certainty that salesperson 137 sold product 19440 to customer 0839. That would
6.1 T ERNARY R ELATIONSHIPS
YOUR
TURN
T ernary relationships are all around
us. Think about an automobile dealership. Certainly the
dealership management wants to keep track of which
car was sold to which customer by which salesperson.
Certainly this is important for billing, accounting, and
commission purposes. But also, in that kind of high-
priced product environment, it's simply good business
to keep track of such information for future marketing and
customer relationship reasons.
Q UESTION :
Consider a hospital environment involving patients,
doctors, nurses, procedures, medicines, hospital rooms,
etc. Make a list of five ternary relationships in this
environment. Remember that each one has to make
sense from a business point of view.
 
Search WWH ::




Custom Search