Databases Reference
In-Depth Information
Figure 3-17
SalesPerson
SalesPerson
PK ID
PK ID
FirstName
LastName
Department
Supervisor
FirstName
LastName
Department
Supervisor
Creates/Is Created By
OrderHead
OrderHead
PK
OrderNumber
PK
OrderNumber
Customer
SalesPerson
Date
ID
Customer
SalesPerson
Date
ID
FK1
FK1
Visio database diagrams.
be forced to identify the key columns in the referenced and referencing enti-
ties when defining a relationship. You might also be forced to provide cardi-
nality and modality information for each relationship. This added functionality
can help you avoid mistakes when designing a very large or very complicated
database.
3.4.2 The General Hardware Company
Figure 3-18 is the E-R diagram for the General Hardware Company, parts of
which we have been using throughout this chapter. General Hardware is a whole-
saler and distributor of various manufacturers' tools and other hardware prod-
ucts. Its customers are hardware and home improvement stores, which in turn
sell the products at retail to individual consumers. Again, as a middleman it buys
its goods from the manufacturers and then sells them to the retail stores. How
exactly does General Hardware operate? Now that we know something about E-
R diagrams, let's see if we can figure it out from Figure 3-18.
Begin with the SALESPERSON entity box in the middle on the left. SALES-
PERSON has four attributes, with one of them, Salesperson Number, serving as
Search WWH ::




Custom Search