Relationship
Considerations
One-to-One Relationship
Considerations
Simply include the primary key
of each table as a foreign key
in the other table
No guarantee that the
information will match
2
Figure 6-20
Rep
Customer
Customer
5
Figure 6-22
Customer
Better solution
Createseparate tables for
customers and sales reps
Include the primary key of
one of them as a foreign key
in the other
7
Figure 6-23, Solution 1
Rep
Customer
CustomerNum CustomerName
126 Toys Galore
260 Brookings Direct
334 The Everything Shop
Customer
10
FIGURE 6-24
Sales
FIGURE 6-25: Results obtained by splitting the Sales table into three tables
Figure 6-26
Sales
RepNum CustomerNum ItemNum
15 126 DL51
15 126 FD11
30 126 DL51 !!!!
30 126 TR40
30 586 DL51
45 126 DL51 !!!!
45 126 DL51
45 260 MT03
45 796 TR40
FIGURE 6-24: Results obtained by joining three tables the third and sixth rows
are in error!