Database Reference
In-Depth Information
AcctBal
AccountNo
BANK
ACCOUNT
CHECKING
ACCOUNT
SAVINGS
ACCOUNT
LOAN
ACCOUNT
MnthlyPymt
Overdraft
InterestRate
MinBal
SavType
LoanType
Figure 6-19
Subsets: inheritance of attributes.
Inheritance of Attributes
A significant feature of a superset and its subsets is the inheritance of the attributes
by each subset from the superset. These are the attributes that are common to all
the subsets. In the case of the objects for a medical center as discussed above, all
the subsets share common attributes such as PatientID, PatientName, Address, and
Diagnosis. Because the subsets share these attributes, there is no point in repeating
these as attributes of each of the subsets. In a data model diagram, you may, there-
fore, show these as attributes of the superset. The principle of inheritance of attrib-
utes by the subsets from the superset implies that each of the subsets has these
attributes. In addition, each subset may have other attributes specific only to that
subset.
Figure 6-19 illustrates the principle of inheritance of attributes by the subsets.
Note the common attributes shown at the superset level. Also, observe the attrib-
utes specific to individual subsets.
Inheritance of Relationships
Let us take an example of a company leasing vehicles to customers. A lease agree-
ment covers a particular leasing arrangement with a customer. Examining the infor-
mation requirements, you can come up with two initial objects, namely, VEHICLE
and AGREEMENT. Of course, there would be other objects. But let us consider
these two objects for now. Over a period of time, the same vehicle would relate to
different lease agreements. That is, when a vehicle comes out of one lease agree-
ment, it would be leased to another customer or to the same customer with a new
lease agreement. You note that a direct relationship exists the objects AGREE-
MENT and VEHICLE.
Examine the instances of the object VEHICLE. Do all the instances have the
same attributes? You quickly notice that cars, trucks, and vans that are leased have
common attributes. More importantly, each of these three types has specific attrib-
Search WWH ::




Custom Search