Entity Modelling

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


What is meant by Relational?

In computer science the term ‘relational’ applies to a particular style of data table; its use in this sense we describe here except that we describe it in a general setting by considering ‘relational’ as applying to a certain style of message system. Instead of saying ‘columns of a table’ I shall say ‘attributes within a message structure’; this choice of terminology is made so as to ensure both that concepts are presented in their full generality and also that software tools that support the concepts have the widest possible applicability.

So what is meant by relational when applied to a message structure? We ask this question in the context of entity modelling; we assume therefore an entity model and a system of messages so that each message communicates what we know of an entity. In this context a message is relational if and only if it communicates only attributes of a single subject entity and if it does not rely on context; in particular (a) it does nor rely on context to determine the identity of the subject entity and (b) it does not rely on context for the interpretation of referential attributes.

A message system which has full coverage of an entity model is called a relational database schema. Relational database design as an after step of entity modelling is to design a minimum such message system i.e one from which if any attribute of any message is removed from the system the the system no longer has coverage of the entity model.

Earlier, in display (9) of section attributes we gave examples of messages conveying information regarding chemical compounds aspirin, common salt and water, their aliases, their molar masses and their chemical formulae. In that example there was one messsage per each of these three example compounds and each message included attributes from subordinate entities of the compound entity i.e from its aliass and its occuring elements as well as including attributes of the compound itself. The same information can be conveyed relationally in the fourteen messages shown below in (10). Both (9) and (10) convey the same information.

  • aspirin is a chemical compound; it has molar mass 180.16
  • common salt is a chemical compound; it has molar mass 58.44
  • water is a chemical compound; it has molar mass 18.01
  • aspirin is also know as acetylsalicylic acid
  • common salt is also know as sodium chloride
  • common salt is also know as halite
  • water is also know as oxidane
  • the number of C atoms in each molecule of aspirin is 9
  • the number of H atoms in each molecule of aspirin is 8
  • the number of O atoms in each molecule of aspirin is 4
  • the number of Na atom in each molecule of common salt is 1
  • the number of Cl atom in each molecule of common salt is 1
  • the number of H atoms in each molecule of water is 2
  • the number of O atoms in each molecule of water is 1
(10)

This set of messages (10) is relational because each message gives information about a single entity type. The information can be conveyed in three tables, one per subject entity type, as shown in figure 7.

compound
name molar mass
aspirin 180.16
common salt 58.44
water 18.01
VVVVV
VVVVV
alias
aliased name compound name
acetylsalicylic acid aspirin
sodium chloride common salt
halite common salt
oxidane water
hhhhhh
occurring element
compound name symbol number
aspirin C 9
aspirin H 8
aspirin O 4
common salt Na
common salt Cl
water H 2
water O
Figure 7
Relational presentation of formulae and alisases for three chemical compounds.