Databases Reference
In-Depth Information
is included instead of separately creating an entity type
as in
Exhibit 1. On the lines emanating from the RI rectangle, a referenced at-
tribute (
_
VEHICLE
TYPE
_
.
VehTypeName
), and a referencing attribute (
RENTAL
PACKAGE
VEHI-
), are specified explicitly; whereas, in Exhibit 11-1 this
referential integrity is implicitly represented via the foreign key concept.
.
VehTypeName
CLE
The Relational Model
The ARI constraint can be directly represented on the referencing at-
tribute of a relation by specifying a referenced attribute of the other rela-
tion. A notation representing this is:
ARI(<referencing attribute>)
<referenced attribute>
For example, Exhibit 5 shows a set of relations generated from the E-R
model shown in Exhibit 4 . By specifying the attribute referential integrity
constraint directly on
.
VehTypeName
, there is no need to create a new
VEHICLE
relation of
because no foreign keys are involved to specify the
referential integrity constraints as in Exhibit 2. Instead, the referential integ-
rity constraint on
_
VEHICLE
TYPE
VehTypeName
can be directly and explicitly specified on
the referencing attribute,
.
VehTypeName
, referring to the referenced
VEHICLE
attribute,
_
.
VehTypeName
.
RENTAL
PACKAGE
RENTAL_PACKAGE
PK
TermID#
Rate
VehTypeName
VEHICLE
ARI->RENTAL_PACKAGE.VehTypeName
PK
VehlD#
Make
VehTypeName
Exhibit 28-5. A relational model generated from the E-R model in Exhibit 11.4.
Search WWH ::




Custom Search