Database Reference
In-Depth Information
Figure 5-17
Form Indicating a 1:N
Relationship
the users. Figure 5-18 depicts the situation in which a DEPARTMENT must have a COMPANY
but a COMPANY need not have any DEPARTMENTs.
N:M Strong Entity Relationships
Figure 5-19(a) shows a form with data about a supplier and the parts it is prepared to supply.
Figure 5-19(b) shows a report that summarizes parts and lists the companies that can supply
those parts. In both cases, the relationship is many: A SUPPLIER supplies many PARTs, and a
PART is supplied by many SUPPLIERs. Thus, the relationship is N:M.
Figure 5-20 shows a data model that extends the data model in Figure 5-18 to include this
new relationship. A supplier is a company, so we show the supplier entity as a COMPANY.
Because not all companies are suppliers, the relationship from COMPANY to PART must
be optional. However, every part must be supplied from somewhere, so the relationship from
PART to COMPANY is mandatory.
In summary, the three types of strong entity relationships are 1:1, 1:N, and N:M. You can
infer the maximum cardinality in one direction from a form or report. You must examine a
second form or report to determine the maximum cardinality in the other direction. If no form
or report that shows the relationship is available, you must ask the users. Generally, it is not
possible to determine minimum cardinality from forms and reports.
ID-Dependent Relationships
Three principle patterns use ID-dependent entities: multivalued attribute, archetype/instance
(also called version/instance ), and association. Because the association pattern is often con-
fused with the N:M strong entity relationships just discussed, we will look at that pattern first.
The association Pattern
An association pattern is subtly and confusingly similar to an N:M strong relationship. To see
why, examine the report in Figure 5-21 and compare it with the report in Figure 5-19(b).
Figure 5-18
Data Model for the 1:N
Relationship in Figure 5-17
COMPANY
CompanyName
City
DEPARTMENT
DepartmentName
BudgetCode
MailStop
 
Search WWH ::




Custom Search