Database Reference
In-Depth Information
When the existence of one entity depends on the existence of another related entity, there is an exis-
tence dependency. For example, because an order cannot exist without a customer, the relationship between
customers and orders is an existence dependency. You indicate an existence dependency by placing an E in
the relationship diamond, as shown in Figure 6-41. An entity that depends on another entity for its own
existence is called a weak entity. A double rectangle encloses a weak entity, as shown in Figure 6-41. A weak
entity corresponds to the term dependent entity, which was previously defined in this chapter.
221
Customer
1
Existence
dependency
E
n
Weak
entity
Orders
FIGURE 6-41
E-R diagram with an existence dependency and a weak entity
There is another popular way to indicate a one-to-many relationship. In this alternative, you do not label
the
one
end of the relationship; instead, you place a crow
'
s foot at the
many
end of the relationship.
Figure 6-42 illustrates this style.
Rep
Represents
Customer
Many part
of the relationship
is drawn as a
crow's foot
One part of
the relationship
has no symbol
FIGURE 6-42
E-R diagram with a crow's foot
Some people represent cardinality, or the number of items that must be included in a relationship, in an
E-R diagram. Figure 6-43 shows an E-R diagram that represents cardinality in this way. The two symbols to
the right of the Rep rectangle are both the number 1. The 1 closest to the rectangle indicates that the maxi-
mum cardinality is one; that is, a customer can have at most one sales rep. The 1 closest to the relationship
is the minimum cardinality; that is, a customer must have at least one sales rep. Together the two symbols
indicates that a customer must have exactly one sales rep. (If the minimum cardinality were zero, for exam-
ple, a customer would not be required to have a sales rep.)
Search WWH ::




Custom Search