Previous | Table of Contents | Next |
The concept of a key, a set of attributes that defines uniqueness among the instances of a class, is already introduced in
the Foundation Keys&Indexes package by the UniqueKey class. The Relational model extends the UniqueKey class to UniqueConstraint.
Similarly, the Relational package uses KeyRelationship from the Foundation package as the basis of a ForeignKey. The generic
associations of the Foundation’s UniqueKey and KeyRelationship between themselves, Class and StructuralFeatures are inherited
by associations between UniqueConstraint, ForeignKey, Table, and Columns in the Relational package.
UniqueKey
(fromKeysIndexes)
feature
KeyRelationship
feature StructuralFeature (fromKeysIndexes)
(fromCore)
{ordered} /uniqueKey UniqueConstraint ColumnSet /owner
/ownedElement
Attribute (fromCore)
optionScopeColumnSet
optionScopeColumn
NamedColumnSet
/feature
/feature
{ordered}
{ordered}Column
{ordered}
ForeignKey/ownedElement
/keyRelaitonship
/feature
/namespace PrimaryKey
able
/namespace /ownedElement
/namespace
Figure 6-9 UniqueConstraint and ForeignKey