Entity relationship diagram

From Rice Wiki
(Redirected from ERD)

As the name suggests, an entity relationship diagram (ERD) shows entities, their properties, and their relationships with other entities. It is the industry standard used to illustrate relational databases graphically.

Definitions

The core of an ERD is the entity. It is a definable "thing" that stores information.

Both entity types and entity sets are groups of definable things. However, entity types are time-independent, whereas entity sets are entity types at a particular interval of time. An entity is an instance of an entity type.

Entity categories

Entities are categorized into strong, weak, and associative. A strong entity can be defined solely by its properties, making it unique to other strong entities of the same type, whereas a weak one cannot be defined solely by its properties and is usually tied to a strong entity. The difference can be thought of as one having a key and the other not having one.

In contrast to the distinction between strong and weak by the uniqueness of an entity in its type, an associative entity is used to describe an association (relationship) between entities. Think of it as weak entities with multiple parents.

Figure 1. Cardinality diagram sourced from lucidchart

Cardinality

Lines are used to represent relationships between entity types in an ERD, and the cardinality of the relationship further describes that relationship in terms of the number on each side. Figure 1 illustrates all cardinality lines.

Sources