Degrees of Relationship Types
Explore the different degrees of relationship types within the Entity-Relationship data model. Understand unary relationships involving one entity type in multiple roles, binary relationships between two entity types, and ternary relationships linking three entities. This lesson helps you identify and represent these relationship types accurately to design effective and clear ER diagrams for database systems.
We'll cover the following...
Degrees of relationship types
Consider the scenario where an employee works on multiple projects, so for a single EMPLOYEE entity the number of PROJECT entities he/she is associated with is multiple. Similarly, a PROJECT entity can have multiple EMPLOYEE entities that work on it. We represent this situation in our ER model through the degrees of a relationship.
The degree of a relationship type is the number of participating entities types. We will focus on mainly three types of degrees:
The Unary (recursive) relationship type
The unary relationship type involves only one entity type. However, the same entity type participates in the relationship type in different roles. For example, The SUPERVISES relationship type relates an employee to a supervisor, where both employee and supervisor entities are members of the same EMPLOYEE entity set. Hence, the EMPLOYEE entity type participates twice in SUPERVISION: once in the role of supervisor, and once in the role of the supervisee. This concept is illustrated below:
Each relationship instance r in SUPERVISES associates two different employee entities e and e, one of which plays the role of supervisor and the other the role of the supervisee. In the figure above, the dotted lines represent the supervisor role, and the solid lines represent the supervisee role; hence, e supervises e ...