Entity Modelling

www.entitymodelling.org - entity modelling introduced from first principles - relational database design theory and practice - dependent type theory

## Existence Assertions/Pullbacks

Relationship cardinalities can be said to make existence assertions - that such an such entity may or must exist in relation to a given entity. Sometimes it is useful to make further existence assertions beyond what can be asserted by means of relationship cardinality, applying as cardinality does to a single relationship. In this section we introduce a notation for doing so for a certain significant class of existence assertions which involves use of a ‘bowtie’ symbol on each of two or more contributing relationships; visually the bowtie is an extension of the cardinality crowsfoot and the bar used to distinguish identifying relationships. The use of the bowtie was proposed by Bob Appleyard and is a nod in the direction of relational algebra. The combination of uniqueness and existence conditions on entitites of a type conditional upon the proper scoping of relationships is expressed by pullback diagrams in category theory and so we speak of certain diagrams of relationships as pullback diagrams. We now give a number of examples.

### Matrices

In the example in figure 47 the existence assertion is to the effect that in a mathematic matrix there is an element for each combination of a row and a column. According to the uniqueness assertion there is at most one. The bowties assert both the existence and the uniqueness and the square of relationships is said to be a pullback square.

• every matrix has one or more rows
• every matrix has one or more columns
• every matrix has one or more elements
• every element is part of row and part of a column
• uniqueness assertion — to a given row and a given column there is at most one element that is part of the row and part of the column
• existence assertion — to a given row and a given column there is at least one element that is part of the row and part of the column
Figure 47
Model of a mathematical matrix.

### Tabular Displays

There is a similar shape to the models representing the structure1 of rectangular tables of data. An example is given in figure 48. In the HTML language, and in other computer markup languages, such data tables are communicated row by row rather than column by column.

In some tabular displays the rows or columns of a table, or both, may be grouped together to represent some grouping of the subjects. The structure then has different branches that are hierarchical and joined at the detail level into the recognisable shape of the 2 dimensional matrix structure. One such is illustrated in figure 49.

Figure 48
Model of the structure of a tabular display. Note that what is modelled is the structure of the display rather than the structure of the subject entities though, having said which, there is an important meta-relationship between the two — for of necessity there is a meta-relationship between the structure of a system of subject entities and the structure of a medium through which details of such a system may be communicated or visualised.
Team sheet
Goalkeeper GK Paul Robinson
Defenders LB Lucus Radebe
DC Michael Duberry
DC Dominic Matteo
RB Didier Domi
Midfielders MC David Batty
MC Eirik Bakke
MC Jody Morris
Forward FW Jamie McMaster
Strikers ST Alan Smith
ST Mark Viduka
Figure 49
Tabular structure in which rows are grouped — part of dataset from U.S. Bureau of the Census2
Rank by Population of the 100 Largest Urban Places
State Urban Place 1960 1970 1980 1990
ARIZONA Phoenix - - - 85
Tucson 61 23 22 15
CALIFORNIA Fresno 24 27 29 36
Long Beech - - - -
Los Angeles - 90 88 93
Oakland 83 - - -
TEXAS Dallas 43 44 36 44
Los Angeles - 90 88 93
Oakland 83 - - -
VIRGINIA Virginia Beech 2 2 2 3
WASHINGTON Chicago 2 2 2 3
WISCIONSIN Milwauke 2 2 2 3

### Network and Matrix versus Hierarchical

The terms network and matrix are commonly used in contrast to the term hierarchical to refer to arrangements of entities not constrained to be hierarchical; for example in organisational structure the term matrix management is used in situations were different dimensions are managed by different management hierarchies and in which individuals therefore have multiple reporting lines. The term hierarchical is etymologically derived from Greek sacred ruler and emerged in its modern sense via its use in medieval times in relation to the church organisation.

1 I am distinguishing here between the structure of the tabular display from the structure of the subject entitites
2 http:/www.census.gov/population/www/documentation/twps0027/tab01.txt,
Internet Release date: June 15, 1998