Keys



next up previous
Next: Primary Keys for Up: The Entity-Relationship Model Previous: Mapping Constraints

Keys

Differences between entities must be expressed in terms of attributes.

An entity set that does not possess sufficient attributes to form a primary key is called a weak entity set. One that does have a primary key is called a strong entity set.

For example,

For a weak entity set to be meaningful, it must be part of a one-to-many relationship set. This relationship set should have no descriptive attributes. (Why?)

The idea of strong and weak entity sets is related to the existence dependencies seen earlier.

A weak entity set does not have a primary key, but we need a means of distinguishing among the entities.

The discriminator of a weak entity set is a set of attributes that allows this distinction to be made.

The primary key of a weak entity set is formed by taking the primary key of the strong entity set on which its existence depends (see Mapping Constraints) plus its discriminator.

To illustrate:

Just Remember: The primary key of a weak entity is found by taking the primary key of the strong entity on which it is existence-dependent, plus the discriminator of the weak entity set.



next up previous
Next: Primary Keys for Up: The Entity-Relationship Model Previous: Mapping Constraints



Page created and maintained by Osmar R. Zaï ane
Last Update: Sun Sep 10 17:02:35 PDT 1995