Weak Entity Sets

Weak Entity Sets

There is a special condition in which an entity set's key is consisting of attributes some or all of which belong to another entity set. Such an entity set is called a weak entity set.

Causes of Weak Entity Sets

There are two major sources of weak entity sets. First, sometimes entity sets fall into a hierarchy based on classifications unrelated to the "isa hierarchy" of "Subclasses in the E/R Model". If entities of set E are subunits of entities in set F, then it is possible that the names of E entities are not unique until we take into account the name of the F entity to which the E entity is subordinate. Various examples will illustrate the problem.

Example (a) : A movie studio might have several film crews. The crews might be designated by a given studio as crew 1, crew 2, and so on. However, other studios might use the same designations for crews, so the attribute number is not a key for crews. Rather, to name a crew distinctively, we need to give both the name of the studio to which it belongs and the number of the crew. The situation is suggested by the following figure (a). The key for weak entity set Crews is its own number attribute and the name attribute of the unique studio to which the crew is related by the many-one Unit-of relationship.


Example (b) : A species is designated by its genus and species names. For instance, humans are of the species Homo sapiens; Homo is the genus name and sapiens the species name. Generally, a genus contains several species, each of which has a name beginning with the genus name and continuing with the species name. Unluckily, species names, by themselves, are not unique. Two or more genera may have species with the same species name. Thus, to designate a species uniquely we need both the species name and the name of the genus to which the species is related by the Belongs-to relationship, as suggested in the following figure (b). Species is a weak entity set whose key comes partly from its genus.



The second common source of weak entity sets is the connecting entity sets that we introduced in "Converting Multiway Relationships to Binary" as a way to remove a multiway relationship. These entity sets often have no attributes of their own. Their key is made from the attributes that are the key attributes for the entity sets they connect.

Example (c) : In the following figure (c), we see a connecting entity set Contracts that takes the place of the ternary relationship Contracts of "Multiway Relationships" Example. Contracts have an attribute salary, but this attribute does not contribute to the key. Rather, the key for a contract comprises the name of the studio and the star involved, plus the title and year of the movie involved.





Tags