Database Reference
In-Depth Information
ID-dependent entities pose restrictions on the processing of the database that is con-
structed from them. Namely, the row that represents the parent entity must be created before
any ID-dependent child row can be created. Further, when a parent row is deleted, all child
rows must be deleted as well.
ID-dependent entities are common. Another example is the entity VERSION in the re-
lationship between PRODUCT and VERSION, where PRODUCT is a software product and
VERSION is a release of that software product. The identifier of PRODUCT is ProductName,
and the identifier of VERSION is (ProductName, ReleaseNumber). Yet another example is
EDITION in the relationship between TEXTBOOK and EDITION. The identifier of TEXTBOOK
is Title, and the identifier of EDITION is (Title, EditionNumber).
By ThE Way The parent entity of a child ID-dependent entity is sometimes referred
to as an owner entity. For example, a BUILDING is the owner of the
APARTMENTs within it.
Non-ID-Dependent Weak Entities
All ID-dependent entities are weak entities. But, according to the original E-R model, some en-
tities that are weak are not ID-dependent. Consider the AUTO_MODEL and VEHICLE entity
classes in the database of a car manufacturer, such as Ford or Honda, as shown in Figure 5-11.
In Figure 5-11(a), each VEHICLE is assigned a sequential number as it is manufactured.
So, for the manufacturer's “Super SUV” AUTO_MODEL, the first VEHICLE manufactured gets
a ManufacturingSeqNumber of 1, the next gets a ManufacturingSeqNumber of 2, and so on.
This is clearly an ID-dependent relationship because ManufacturingSeqNumber is based on
the Manufacturer and Model.
Now let's assign VEHICLE an identifier that is independent of the Manufacturer and
Model. We will use a VIN (vehicle identification number), as shown in Figure 5-11(b). Now the
AUTO_MODEL
Manufacturer
Model
Description
NumberOfPassengers
EngineType
RatedMPG
AUTO_MODEL
Manufacturer
Model
Description
NumberOfPassengers
EngineType
RatedMPG
Figure 5-11
Non-ID-Dependent Weak
Entity Example
VEHICLE
Manufacturer
Model
ManufacturingSeqNumber
DateManufactured
Color
DealerName
DealerCost
SalesDate
SalesPrice
VEHICLE
VIN
DateManufactured
Color
DealerName
DealerCost
SalesDate
SalesPrice
Note: VEHICLE is a weak but not
ID-dependent entity.
(a) ID-Dependent Entity
(b) Non-ID-Dependent
Weak Entity
 
 
Search WWH ::




Custom Search