Previous Table of Contents Next


6.2.9 Instances


   It is sometimes necessary to provide either a copy or a sample of the data as part of the metadata. For example, one may want to specify during the design phase what will be the content of a Gender table. This is similar to the use of Collaboration diagrams in UML.

    Figure 6-13 shows how a Rowset inherits from Extent, from the Foundation package. It represents all the data comprised in a ColumnSet. A RowSet can only be owned by a ColumnSet or any derived class. A RowSet contains Rows. Row inherits from Object. Its structure is defined by the corresponding ColumnSet and its Columns. Each Row is divided into ColumnValues, which match the value of a relational table, at the intersection of a row and a column. ColumnValue inherits from DataValue from ObjectModel.

   Package (from Core)


   /feature Attribute (from Core)

   Figure 6-13 Relational Instance classes

    Figure 6-14 shows a collaboration diagram, we show how the instances for the two column, two row Gender table are represented, and how they are associated with the Gender table definition. Two kinds of Instances are instantiated: Row and ColumnValue. The Row is associated with the AttributeLink through the instance/slot association. The ColumnValue is associated with the AttributeLink through the value association. While not shown on the diagram to keep it readable, each Instance is associated with a Class: the Row would be associated with the ColumnSet, and the ColumnValue with the SQLType of the corresponding Column.

   Gender : Table : RowSet



    : Slot



   M : ColumnValue


    : Slot


   Male : ColumnValue

    : Slot



   F : ColumnValue


   Female : ColumnValue : Row


   Code : Column

   Name : Column



   Figure 6-14 Collaboration diagram showing use of instance classes