Entity Modelling

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


Cascading Identifiers

Consider the two logically equivalent models shown in figure 13. The first is fully logical and the second fully physical.

(a) a fully logical model

(b) a relational fully physical model that is logically equivalent

Figure 13
Two models that are logically the same. The second has affinity to a relational message system.

Now see what happens in fully physical models when some of the relationships are identifying, for instance if we change the example slightly so that in the fully logical model the relationships g and h are specified to be identifying as shown in figure 14 (a). In a corresponding physical model, reference attributes that represent g and h themselves need to be specified as identifying. This, in the fully physical model, requires the existence of further attributes to represent relationships f and g. The identifying attribute of A is said to cascade to entity types B and C. This is illustrated in figure 14 (b).

(a) the same logical model as in figure 13 but with g and h identifying

(b) a relational fully physical model that is logically equivalent

Figure 14
Example of a model in which identifiers have been cascaded.

In the example in figure 14 the attribute b0 of entity type B is shown as being identifying only when taken in conjunction with the relationship h. For this reason the referential attribute a0 which represents h is shown as an identifying attribute of B. The values of a0 and b0 are to be taken in conjunction to identify a unique entity of type B. This in turns means that the relationship g is represented by a pair of attributes of entity type C - both shown as identifying because relationship g is identifying. Finally, as a consequence, the relationship f of the entity type D is by necessity represented by a triple of attributes here shown named a0, b0 and c0 and each annotated with the parenthetical text (R1) to show their role in the model.

Identifying attributes are often called key attributes or just keys and those that individually or in combination reference entities other than the subject entity are sometimes called cascaded keys.