Weak Entities

A weak entity is an entity that exists only if is related to a set of uniquely determined entities, which are called the owners of the weak entity. For instance, we could extend our library with a weak entity type edition; each book has several editions, and certainly it is nonsense to speak about an edition if this does not happen in the context of a specific book. From a user interface viewpoint, weak entities are usually edited in the context of (one of) their owners. When an entity is deleted from a schema instance, all owned weak entities are deleted, too. We shall call the type of a weak entity a weak entity type.

For entities of type W to be owned by entities of type X, a requirement must be satisfied: there must be an identifying function from W to X that specifies the owner of each entity of type W, that is, a relationship type going from W to X whose cardinality constraint impose its instances to be functions. Deletion of an entity of type X implies deletion of all related entities of W.

Weakness is recursive. If x owns y and y owns z, then x (indirectly) owns z. Of course, it must never happen that an entity is owned by another one by means of two distinct ownership paths; as a special case, it must not happen that an entity owns itself. ERtool performs a novel static check guaranteeing that this will not happen.