6.2.5 Relationships between attribute values and links
Before Activity 20, we discussed the relationship that needs to be preserved between the capacity of a ward and the number of free beds on that ward. A related factor is the number of patients already on the ward. The invariant should be extended to take account of this, as follows:
For each
object, the value of its
attribute is equal to the value of its
attribute minus the number of
objects to which it is linked.