A relationship is an association among several entities. A relationship instance in an E-R schema represents an association between the named entities in the real-world enterprise that is being modeled.
A relationship set is a set of relationships of the same type. Formally, it is a mathematical relation on entity sets that are not necessarily distinct.
If are entity sets, then a relationship set is a subset of
where is a relationship.
The entity sets are said to participate in the relationship set .
The function that an entity plays in a relationship is called that entityβs role. Each occurrence of an entity set plays a role in the relationship. However, since entity sets participating in a relationship set are generally distinct, roles are implicit and are not usually specified.
An relationship may also have attributes called descriptive attirbutes that are associated with a relationship set.
Nonbinary relationship sets
The number of entity sets that participate in a relationship set is the degree of the relationship set.
- A binary set relationship set is of degree 2.
- A ternary set relationship set is of degree 3.
A relationship set with degree greater than 2 are uncommon in practice.