Where used: Mapping Model


isRelationMapFor / hasRelationMap

Mapping isRelationMapFor Relation

Relation hasRelationMap Mapping


Read First: Relation, Tuple, Mapping

A relation mapping is a way to find some the elements of a tuple given
the others.  For example, the relation Marriage, has two relation
mappings, one taking the first element of a tuple as input and returning
the second, the other taking the second element as input and returning
the first. If (Jane, John) is a tuple of Marriage, then one relation
mapping return Johns when given Jane, the other returns Jane when given
John.

See the summary with example at Place Relation.


How Many Relation Mappings Per Relation

The number of relation mappings increases combinatorially as the arity
increases, because any subset of the elements can be mapped into the
remaining elements.  The formula for the number of relation mappings is

      n! / ( i! * (n-i)! )

where n is the number of inputs to the relation mappings, i is the
arity, and ! means factorial.  This assumes that the order of inputs of
the relation mapping is made irrelevant somehow, like by always using
the order as they are in the tuples.


The minimum cardinality for the Mapping end is 2, because relations
connect at least two things.  This cardinality can be violated at
design-time (see Mapping) for optimization.  Since the relation maps are
required at analysis time to draw the object diagrams and identify the
relations, they are required in the meta-model.  It is usually not
desirable to let the style of display affect our model like this, but we
can't think of a way around it.

Read First: Relation, Tuple, Mapping