www.entitymodelling.org - entity modelling introduced from first principles - relational database design theory and practice - dependent type theory
If we model the marriage entity then we make it double dependent on person entity and since at the time of writing same sex marriage is not legal in my part of the world I can model it as a dependent on a male entity on the one hand, and a female on the other:
In this model, unlike in those of figures 11 and 12 to which it is superficially similar, the subordinate entity, marriage, has no exclusion arc between its dependencies — which is to say that the model shows each subordinate entity marriage to be dependent on two superordinate entities — those shown as male and female. For the first time we see that the modelling notation is not constrained to situations where every entity has at most one other that it is dependent on. What is now absent in this example is hierarchy for it is the defining principle of hierarchy that, in a hierarchical system, every entity within the system is subordinate to at most one other entity. We can say that we have conjunctive dependencies now whereas before when we used the arc to indicated exclusion then the dependencies were specified to be disjunctive.
In passing, note that there is no uniqueness indicated for marriage on the above diagram; this is because I was thinking of all mariages and not all extant marriages. Thinking over all time, as I was, I knew that each marriage need not be unique for two given people (actress Elizabeth Taylor was married to Richard Burton on two separate occasions, for example). If instead I am thinking of marriages extant at a given time then cardinalities change and I can chose either of parties as a suitable way of identifying amarriage. One choice is as follows:
Finally, consider the following model of a marriage:
In other cases where conjunctive dependencies are modelled, the superordinate types (by which I mean for example the types male and female above) are not distinct in that is there is a double dependency on a single type. We see this in example in figure 45— the type in question being arc which the type vertex is doubly dependent on.
Mathematicians define and use various notions each which abstract the idea of a network of points and connecting lines independently of how or whether physically realised. They define such abstract notions using the language of sets and relations; they use the term graph for the most abstract concept of such a network and they variously use the terms point, node or vertex for the things connected; generally they use the term edge, directed edge, arc or arrow for the connections. There is not a single terminology and so we have to plump for one of several available; the diagram clarifies the choices made. For an entity modeller, and therefore for a database designer, the most straight forward of the graph notions is that of a directed graph.
One of the restrictions sometimes required of a graph structures is that there be at most one edge between any two vertices. The term simple graph is used for graphs having this property and having the further property that vertices are not linked to themselves. In such cases the fact that there is at most one edge between any two verticies means that an edge can be uniquely identified by identifying the vertices that it connects. The model of a simple directed graph captures this fact as shown in figure 46.