www.entitymodelling.org - entity modelling introduced from first principles - relational database design theory and practice - dependent type theory
The notation introduced for composition relationships has been descriptive of properties of relationships including cardinality and optionality (the crows foot and dashing of lines), exclusion (the exclusion arc) and use of abstraction (nested boxes). These notations apply equally to the representation of reference relationships. A reference relationship can be looped around to relate instances of a single type and it is then said to be recursive. If it is many-one then a hierarchical1 system of entities is implied such as a command hierarchy:
A reference relationship can be looped around to enter the opposite edge with no difference in meaning so the following is equivalent:
Consider also a chain composed of links each connected to the next. Each link of a chain is followed by the next and each link follows at most one other which is to say there is a recursive relationship:
For a more complete model see figure 9.
Some recursive relationships cannot be given a different role at either end for they are symmetric. For example x1 is married to x2 precisely if x2 is married to x1. Marriage is a symmetric binary relationship. When this relationship is shown in an entity model then it must be given the same the name at either end as so:
As a shorthand we can compress this to a single line:
The example in figure 10 combines composition structure (molecule has atoms has bonds formed) and reference structure atoms reference elements of the periodic table and bonds formed reference each other.