Recursive Relationships

For Complete YouTube Video: Click Here

In this class, we will understand Recursive Relationships.

We have already discussed the concepts of Role names.

Recursive Relationships

If the same entity type participates more than once in a relationship type in a different role, it is called a recursive relationship.

The image below is the ER-Diagram we have obtained so far.

Role Names of an Entity Type in a Relationship Type 2
Recursive Relationships

To understand the recursive relationship, let us consider the supervisor attribute of the employee entity type.

The crucial point we have to understand is the supervisor of an employee is also an employee.

Here the same entity type is participating more than once in a relationship type supervision.

Supervision is a recursive relationship.

The role of the employee who is the boss is a supervisor, and the employee’s role under someone’s supervision is supervisee.

Cardinality Ratio and Participation

Cardinality Ratio

The maximum participation of the supervisor in the supervision relationship type is N because a supervisor supervises more than one employee.

Similarly, the maximum participation of the supervisee is one because only one employee supervises an employee.

Therefore the cardinality ratio of supervision relationship type is 1:N.

Participation

The participation of the supervisor is partial because all the employees are not supervisors.

The participation of the supervisee is partial because all the employees are not supervisee.

The image below is the ER-Diagram with the recursive relationships.

Recursive Relationships 2
Recursive Relationship 2