Database Reference
In-Depth Information
Identifying entity type. A weak entity is identified by being related to another entity
type called the identifying or owner entity type. ORDER is the identifying entity
type.
Primary key. A weak entity does not have a primary key by itself. Usually, weak
entities are identified by partial identifiers or discriminators just to distinguish them
within the owner entity. For ORDER DETAIL, ItemNo is a partial identifier. The
full primary key of a weak entity type usually consists of the concatenation of the
primary key of the owner entity type with the partial identifier of the weak entity
type. Note the primary key for ORDER DETAIL—OrderNo and ItemNo con-
catenated together.
Identifying relationship. The relationship between a weak entity type and its iden-
tifying or owner entity type is known as an identifying relationship. Observe the
relationship notation shown between ORDER DETAIL and ORDER.
Attributes of Relationship Types
In the discussion of the object-based data model, we studied aggregate object sets.
Recall that relationships between objects sets give rise to aggregate object sets. Such
aggregate object sets behave in the same way as regular object sets. An aggregate
object set may have attributes and relationships with other regular or aggregate
object sets.
This notion of aggregate object sets is also found in the E-R data model. A
relationship object type in E-R modeling corresponds to an aggregate object set in
object-based modeling. Figure 7-18 shows an example of relationship object type.
Note the attributes for the relationship object type WORKSON shown in the
diagram.
When to Use a Gerund
What is a gerund? The relationship entity type described above is sometimes called
a gerund. In English grammar, the word “writing” is a gerund; it is derived from the
verb “to write” but behaves like a noun. Similarly, if a relationship behaves like an
entity type, that relationship may be termed as a gerund.
Consider a three-way many-to-many relationship among three entity types:
CUSTOMER, PRODUCT, and WAREHOUSE. This relationship arises out of the
real-world situation of shipping products to customers from different supply ware-
houses. A diamond symbol normally represents this relationship. However, in
reality, the relationship appears to be an entity type. It is a gerund. When do you,
as a data modeler, represent a relationship as a gerund? You need to represent a
relationship as an entity type if the relationship truly has specific attributes or the
relationship, by itself, has relationships with other entity types.
Figure 7-19 illustrates the gerund SHIPMENT, based on the relationships among
CUSTOMER, PRODUCT, and WAREHOUSE.
Search WWH ::




Custom Search