In: Computer Science
There are many kinds of entity relationships in a database model. The relationships can be classified by the following things.
Cardinality: maximum and minimum
Degree: binary, ternary, degree 4, and so forth
Entity type: strong, weak, ID-dependent, and supertype or subtype
What are these different types of classifications? Do they overlap, or do they each tell us something unique about the entity relationship? Why is it important to classify each of these types in an ERD model?
An entity class is the collection of all entities of a given
type. It is described by the structure of the entities in that
class.
An entity instance is a representation of a particular entity
within the entity class. The entity instance is described by the
values of the attributes of the entity.
An entity class, then, is a collection containing many entity
instances.
The degree of a relationship indicates how many entity classes are
participating in the relationship.
If two entity classes are in the relationship, then the
relationship is said to be of degree two and is called a binary
relationship. If three entity classes are in the relationship, then
the relationship is said to be of degree three and is called a
ternary relationship.
There are two types of cardinality—the maximum cardinality and the
minimum cardinality.
The maximum cardinality is the maximum number of entity instances
that can participate in a relationship instance.
There are three types of maximum cardinality—one-to-one (1:1),
one-to-many (1:N) and many-to-many (N:M).
The minimum cardinality is the minimum number of entity instances
that must participate in a relationship instance.