Modeling of higher order relations (N-ary relations)
Conventional ‘entities’ with their ‘attributes’ are usually higher order relations, because they relate more than two ”attributes”. Some of such relations appear to be natural higher order relations, whereas others appear to be artificial higher order relations. Higher order relations can also be represented by equivalent collections of binary relations, while explicitly including the higher order relations as elements in the model and nevertheless using only binary relation to express their semantics. Thus without loosing any meaning but even by increasing the semantic content. That is done in Semantic Modeling in the following way.
Ordinary relations of any rank are relations that relate a number of ‘things’. An ordinary relation of rank N, being either unary, binary, higher order or of variable order (in time) relates N things together. In the semantic modeling approach the relation is considered a separate ‘thing’, which means that in an N-ary relation there are N+1 ‘things’ involved: the N related things and the N-ary relation itself. This is illustrated in Figure 1.
Figure 1, Fifth order relation that relates six ‘things’
We call such ordinary relations ‘molecular’ relations, because they are composed of N+1 ‘atoms’, whereas the atoms are related with the N-ary molecular relation by N ‘atomic relations’. Thus, for the modeling and expression of relations we make a distinction between two different levels of relations: ordinary (molecular) relations (or level 2 relations) and atomic relations (or level 1 relations, also called involvement relations). A molecular relation of rank N is a relation that is related by N atomic relations of various kinds with the involved things.
An atomic relation is a binary relation between a molecular relation and one of the various things that are involved in the molecular relation. The involved things play their own role in a molecular relation. The various kinds of roles played by the ‘atoms’ cause that there are various kinds of atomic relations. The explicit classification of the atomic relations provides additional semantics about the various kinds of roles that are played by the involved things in higher order relations.
Thus in the semantic modeling approach, any molecular relation (of any rank) is an ‘object’ in its own right and to capture the semantics of the relation, every relation shall be classified explicitly. This holds for binary as well as higher order relations.
Especially higher order as well as variable order relations (N-ary relations) can be represented as ‘objects’ that are classified by kinds of relations, whereas each of them is related by a collection of binary atomic relations to the involved things.
For example, a part-whole relation R is an (ordinary) (molecular) binary relation (e.g. between two ”objects” A and B). Thus that (molecular) composition relation R has two (atomic) binary relations: one between R and A and a different one between R and B.
– A molecular binary relation has two (binary) involvement relations with two different role players.
– A ternary relation has three (binary) involvement relations with three different role players.
– A variable order relation has a number of (binary) involvement relations that varies over time with a number of different role players.
Thus, at an atomic relations level, all N-ary (molecular) relations can be modeled as N-ary (molecular) relations that have N (atomic) binary relations with N involved things.
This enables that information can be expressed by using only binary expressions. However, modeling of higher order relations using only binary expressions does not imply that the higher order relations are replaced by a collection of binary relations, but that the higher order relations themselves are ‘objects’ that have a number of binary atomic relations with involved things.
The document ”Modeling of Activities and Processes” (and state changes), part 5 of the Gellish Modeling Methodology is based on the above approach.
Artificial and natural higher order relations
In semantic modeling we distinguish between ‘artificial higher order relations’ and ‘natural higher order relations’.
In conventional data modeling practice there are many higher order relations created. Usually they are called ‘entity types’ or ‘object types’. Most of those higher order relations are collections of ‘attributes’ that are (artificially) created to reflect business requirements. That grouping convention is based on the theory of the originators of ER-modeling who defined entities as being ‘collections of attributes’ (later extended by others to ‘objects’ that include ‘methods’). Such artificial higher order relation types (entity types) usually represent collections of molecular relations about things. From a semantic perspective they can be split in several molecular relations, but that is usually not done because of practical reasons.
Natural higher order relations are relations that cannot be split in collections of binary relations, because the whole is more than the sum of the parts. For example, occurrences, such as activities and processes, and correlations between multiple variables are natural higher order relations.
In other words, many entity types are artificial groups of natural (binary or higher order) relations and usually they are not ‘natural’ higher order relations.