Model Attribute - modelint/shlaer-mellor-metamodel GitHub Wiki

A Shlaer-Mellor Attribute is defined as a characteristic of a Class. When we think about building class models and state machines, we need not think of an attribute any other way.

For the purpose of a given computation, however, we may want to grab the values a subset of a Class's Attributes and hold them in a temporary table. We can then use relational actions to process that table, possibly yielding multiple intermediate tables before we obtain a computed result. To do this we need to define the structure of a temporary table and we do this by defining a Table Type consisting of a set of Table Attributes.

Class Attributes and Table Attributes are named using the same rules and are each defined by a Scalar type.

So we define a model attribute as either a Table Attribute or a (class) Attribute.

Were it not for the Shlaer-Mellor legacy, we might be inclined to say that an attribute is either a table or class attribute. Informally, that's fine. But the term 'Attribute' is so ingrained in the Shlaer-Mellor community that, we introduce the term Model Attribute to refer to the general concept of an Attribute as a name and a type.

The particular case that motivated this generalization is the definition of a relational restriction (selection). Both a Table Restriction and an instance Selection Action must specify selection criteria. A Criterion doesn't distinguish between table or class attributes, so it is helpful to abstract a Model Attribute instead of having to build identical criterion models for classes and tables.

Identifiers

  1. Name + Non Scalar Type + Domain

Attributes

Name

A name that establishes the purpose or meaning of the Attribute or perhaps some commonly used and understood term relative to the modeled subject matter.

Type: Attribute Name, based on Name

Non Scalar Type

A class or a table name.

Type: Union of Class.Name and Table.Name