ER Diagram Components

Role

An entity can be related to itself. The labels of the relationship are called roles.

  • Total participation (indicated by double line): every entity in the entity set participates in at least one relationship in the relationship set

  • Partial participation: some entities may not participate in any relationship in the relationship set

Weak Entity Sets

A weak entity set is one that doesn't have a primary key. Its existence depends on the existence of other entity set(s), known as strong/identifying entity set(s).

It must relate to the identifying entity set via a total, one-to-many relationship set from the identifying to the weak entity set. Also, the Identifying relationship is depicted using a double diamond.

The discriminator (or partial key) of a weak entity set is the set of attributes that distinguishes among all the entities of a weak entity set. It is underlined using a dashed line.

The primary key of a weak entity set is formed by the primary key of the strong entity set on which the weak entity set is existence-dependent, plus the weak entity set’s discriminator.

Specialization/Generalization

This is another term for inheritance.

The lower-level entity set inherits all the attributes and relationship participation of the higher-level entity set to which it is linked.

Some constraints while modeling a specialization include:

  • constraint on which entities can be members of a given lower-level entity set

  • constraint on whether or not entities may belong to more than one lower-level entity set within a single generalization

    • disjoint: an entity can belong to only one lower-level entity set

    • overlapping: an entity can belong to more than one lower-level entity set

  • completeness constraint: specifies whether or not an entity in the higher-level entity set must belong to at least one of the lower-level entity sets within a generalization

    • total: an entity must belong to one of the lower-level entity sets

    • partial: an entity need not belong to one of the lower-level entity sets

Aggregation

It is used to represent a relationship between relationships.

Last updated