Relationship


superclasses:

Tuple

subclassing:

The user may define subclasses of this class.

attributes:

objectA Tuple

objectB Tuple

classAttributes:

[cardinalityToTypeAInstances] String

[cardinalityToTypeBInstances] String

comments:

This is an abstract superclass under which a number of classes can be defined, where it is of interest to state that the objects of interest have a specific kind of relationship to one another. The objects in the relationship are given explicitly by providing the object identifiers of the two related objects, objectA and objectB. In the case of asymmetric relationships, objectA has the stated relationship to objectB. With symmetric relationships, each object has the stated relationship to the other object.

The optional class attributes cardinalityToTypeAInstances and cardinalityToTypeBInstances are used to define the cardinality (i.e. multiplicity) of the relationship. The values for these two class attributes characterize the relationship in the context of the data being described. They do not refer to individual instances of the class.

Consider a StudentSchool relationship, with objectA and objectB defined as coming from the domains Student and School, respectively. If a student goes to only one school, but the school is attended by many students, then the values for cardinalityToTypeAInstance and cardinalityToTypeBInstance are n and 1, respectively. In a given jurisdiction there may be a policy that all schools have between 400 and 800 students. In this case the two cardinality attributes have the values 400 to 800 and 1, respectively.

If it is of interest to specify the cardinality of the relationship, this may be accomplished by creating a user defined subclass (of Relationship or one of its subclasses) and providing values for the two class attributes in the class definition. This is accomplished using the classAttributeValues clause. For example, using the above example, the clause would be as follows:

classAttributeValues:

cardinalityToTypeAInstances : 400 to 800

cardinalityToTypeBInstances : 1

Note that in the clause above the values in italics should actually be in :

double quotes to be syntactically correct. :

: