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?

This section is about the structure of data held in relational databases but I continue to use the language of messages. Instead of saying ‘columns of a table’ I shall say ‘attributes within a message structure’. This isn't just to be bloody minded — rather it is to make sure both that the concepts are presented in their full generality and also that software tools that support the concepts have the widest possible applicability.

So what is mean 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 it communicates only attributes of a single subject entity and if it does 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.

Consider the information given as three distinct messages in (4) below. Each describes a distinct chemical compound by a chemical formula and gives some of its various names1. — the chemical formula being one of the ways of expressing information about the numbers of the different kinds of atoms that constitute a particular molecular compound. and to this model we can add alternative names i.e. alisases for chemical compounds to arrive at this model:

Contrast the three messages in (4) with the fourteen messages in (5). Both convey the same information
  • water (also know as oxidane) has the formula H2O
  • common salt (also known as sodium chloride or halite) has the formula NaCl
  • aspirin (also know as acetylsalicylic acid) has the formula C9H8O4
  • water is a chemical compound
  • common salt is a chemical compound
  • aspirin is a chemical compound
  • water is also know as oxidane
  • common salt is also know as sodium chloride
  • common salt is also know as halite
  • aspirin is also know as acetylsalicylic acid
  • the number of H atoms in each molecule of water is 2
  • the number of O atoms in each molecule of water is 1
  • 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 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

To analyse the relational form of these messages we need:

1 It is a challenge for chemistry databases such as PubChem that a great many chemical compounds have many different names in current use.