Database Reference
In-Depth Information
Strong Entities and Weak Entities
A strong entity is an entity that represents something that can exist on its own. For example,
PERSON is a strong entity—we consider people to exist as individuals in their own right.
Similarly, AUTOMOBILE is a strong entity. In addition to strong entities, the original version
of the E-R model included the concept of a weak entity , which is defined as any entity whose
existence depends on the presence of another entity.
ID-Dependent Entities
The E-R model includes a special type of weak entity called an ID-dependent entity . An ID-
dependent entity is an entity whose identifier includes the identifier of another entity. Consider,
for example, an entity for a student apartment in a building, as shown in Figure 5-10(a).
The identifier of such an entity is a composite (BuildingName, ApartmentNumber), where
BuildingName is the identifier of the entity BUILDING. ApartmentNumber by itself is insuffi-
cient to tell someone where you live. If you say you live in apartment number 5, they must ask
you, “In what building?” Therefore, APARTMENT is ID-dependent on BUILDING.
Figure 5-10 shows three different ID-dependent entities. In addition to APARTMENT
(which is ID-dependent on BUILDING), the entity PRINT in Figure 5-10(b) is ID-dependent
on PAINTING, and the entity EXAM in Figure 5-10(c) is ID-dependent on PATIENT.
In each of these cases, the ID-dependent entity cannot exist unless the parent (the entity
on which it depends) also exists. Thus, the minimum cardinality from the ID-dependent entity
to the parent is always one.
However, whether the parent is required to have an ID-dependent entity depends on
the application requirements. In Figure 5-10, both APARTMENT and PRINT are optional, but
EXAM is required. These restrictions arise from the nature of the application and not from any
logical requirement.
As shown in Figure 5-10, in our E-R models we use an entity with rounded corners to
represent the ID-dependent entity. We also use a solid line to represent the relationship between
the ID-dependent entity and its parent. This type of a relationship is called an identifying
relationship . A relationship drawn with a dashed line (refer to Figure 5-7) is used between strong
entities and is called a nonidentifying relationship because there are no ID-dependent entities
in the relationship.
BUILDING
PAINTING
PATIENT
Figure 5-10
Example ID-Dependent
Entities
BuildingName
PaintingName
PatientName
Street
City
State/Province
Zip/PostalCode
Description
Dimensions
Year
Artist
Phone
Email
APARTMENT
BuildingName
ApartmentNumber
PRINT
PaintingName
CopyNumber
EXAM
PatientName
ExamDate
NumberBedrooms
NumberBaths
MonthlyRent
Condition
PurchasePrice
DatePurchased
Weight
Height
BloodPressure
(a) APARTMENT Is
ID-Dependent on
BUILDING
(b) PRINT Is
ID-Dependent
on PAINTING
(c) EXAM Is
ID-Dependent
on PATIENT
 
 
Search WWH ::




Custom Search