Entity Modelling

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


Words, Words, Words

Difficulties

We are not alone should we dispair at the difficult of expression of concepts; we have already mentioned H.G.Wells' musing:

There is a sort of stratification in human ideas. I have it very much in mind that various terms in our reasoning lie, as it were, in different planes, and that we accomplish a large amount of error and confusion by reasoning terms together that do not lie or nearly lie in the same plane.

I would say that there are axes of ambiguity that typically confound our best efforts at expression. The examples in this section are illustrative of the use of entity relationship modelling to help overcome some of these difficulties.

book(1) and book(2)

It is often the case that a single word in a single dictionary sense can be used at a number of different levels. We can illustrate this with the word book which in its primary sense seems unambiguous but consider how we can ask the question:

How many books were published last year in the UK?
and contrast with our interpretation of:
How many books were sold last year in the UK?

We expect an answer to the first question to be a count of book titles or ISBN numbers but we expect an answer to the second to be a count of actual physical books sold by publishers. The use of the word book in the first question is at a different level to the use in the second question. The two are related and we classify as a reference relationship: .

An entity model can help disambiguate these distinct uses. We have the situation shown in figure 1.

Figure 1
Different uses of book as a type of entity.

word(1) and word(2)

The word word itself is also used at different levels. For example if we set about counting how many words in the English language we will be counting a different type of entity than if we count words in an essay or in an advertisement that we pay for by the word. There is a clear type instance relationship between the two which we again classify as a reference relationship: . This thinking leads to the model in figure 2.

Figure 2
The occurrence relation between multiple uses of the word word.

letter(1) and letter (2)

The word letter also for we can count the letters in a word and each one is an occurrence of a letter from the alphabet as shown in figure 3.

Figure 3
The scope square of the occurrence of relationship between multiple uses of the word letter.

word(3) and letter(3)

In the model in figure 4 we introduce a third type of word and third type of letter:

word (1) - the word as defined by the dictionary. This is the level I am using when I say ‘What does that word mean?’
word (2) - the words that appear in a book as conceived of by the author. This is the level I have in mind when I write, for example ‘In the words of T.S.Elliott’ or, ‘According to the word of God’. (This last usage of the word word is given as a different sense in the ‘Concise Oxford Dictionary’).
word (3) - the actual copies of the words in some copy of a book. This is the level that we use when we say ‘That word is illegible’.

Figure 4
Occurrence relationships between multiple uses of the word word.

The Model

This leads to the model shown in figure 5.

Figure 5
This example pieces together the fragments described in the previous sections.

In this model there is a further example of a scope square1; this is shown in figure 6.

Figure 6
A scope square for the occurrence relation between letter(3) and letter(2).

Returning for a moment to the question of when to model a relationship as composition (vertical) and when as reference (horizontal) we see that in the model in figure 5 the distinction between composition and reference has been representative of these considerations:

  • Describing an alphabet, I describe its letters but I do not describe the vocabulary of every language using the alphabet.
  • Describing the vocabulary of a language, I describe the words and how they are spelt but I do not describe the corpus of works.
  • Describing the corpus of works, I do not describe the dissemination of that corpus i.e the printed copies.


1In fact the squares show in this section as examples of relationship scoping are of a particular type of scope square each of which, following category theory, we should call a pullback diagram.