Entity Modelling

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

Describing Roles

The front and rear wheels of a bicycle are parts which play different roles within the whole — arguably the front and back wheels should be modelled as different types of entity for the rear wheel has a sprocket, or at least a housing for one, whilst the front does not. In the case of a child's scooter though or in the case, prior to pedal power, of the velocipede, the whole thing has two identical parts playing different roles within the whole. It is for reasons like this that the role played by a part in a whole may be specified in a model. The role played is described as an annotation on the composition relationship at the whole end of the relationship.

Sentence structure gives an example of this, it is shown in figure 11. There may be multiple noun phrases within a sentence — a simple sentence must have a subject noun phrase and it may have have an object noun phrase. Like the front wheel and the rear wheel of a child's scooter the subject and object noun phrases are in and by themselves indistinguishable.

  • every sentence has a subject which is a noun phrase
  • a sentence may have an object which is a noun phrase
Figure 11
Roles of noun phrases within sentences.
  • every scooter has a front wheel which is a wheel
  • every scooter has a rear wheel which is a wheel
Figure 12
Roles of the wheels of a scooter.
  • every flight has exactly one lead which is an element
  • every flight has exactly one second which is an element
  • every element has exactly one leader which is an aircraft
  • every element has exactly one wingman which is an aircraft
Figure 13
Roles within the four-finger flight formation.