Database Reference
In-Depth Information
the child entity for every one record in the parent entity.” In most rela-
tionships, the “zero or more to many” interpretation is correct, so be sure
to specify and document the alternative definition if it's used in your
model.
A many-to-many relationship could be defined as “zero or more to zero
or more records.” In this case, the “zero or more to zero or more records”
cardinality is almost always implied, although you could specify that there
must be at least one record in each entity. In this case, show a many-to-
many as [M:M].
In some data modeling software, you can specify that there be an ex-
plicit cardinality, such as “eight records in the child entity for every one
record in the parent entity.” For example, you may want to model man-
agers to direct reports (business lingo for “people who report directly to
that manager”). The company may state that to be a manager you must
have at least four and no more than twenty direct reports. In this example,
the cardinality would be “at least four and no more than twenty to one.” Be
sure to document this type of cardinality if your business requirements dic-
tate it, because most people will assume the cardinality based on the defi-
nitions given here.
Using Subtypes and Supertypes
When you are determining the entities to be used in a data model, occa-
sionally you may discover a single entity that seems to consist of a number
of other complete entities. When this happens, it can be confusing when
you try to determine which attributes belong to which entities and how to
relate them. The answer to this dilemma is to use a supertype.
Supertypes and Subtypes Defined
A supertype is an entity that has multiple child entities, known as sub-
types, which describe variations of the same type of entity. A collection of
a supertype with its subtypes is sometimes referred to as a subtype clus-
ter. These most commonly occur when you're dealing with categories of
specific things, as shown in the simple example in Figure 2.7.
Assume that we're tracking information about broadband products. In
this example, BroadBand is an entity, with appropriate attributes and a pri-
mary key. However, we want to divide the types of broadband into their
 
 
Search WWH ::




Custom Search