Role Names of an Entity Type in a Relationship Type

For Complete YouTube Video: Click Here

In this class, we will understand the Role Names of an Entity Type in a Relationship Type.

We have already discussed the concept of Relationship type and Entity type.

Role Names of an Entity Type in a Relationship Type

The image below is the ER_Diagram that we have obtained so far.

One to Many Relation on Controls Relationship Type 3
Role Names of an Entity Type in a Relationship Type 1

The relationship type that we have obtained so far are works_for, manages, works_on, and controls.

The entity types that are participating in the relationship type will have specific roles played.

For example, if we consider the employee role concerning the works_on relationship type, he is a worker.

The same employee’s role concerning the work_for is an employee.

Considering the department entity type, concerning the works_for plays a role of the department.

The same department entity type will play the role of controlling depart concerning controls relationship.

Concerning the manages relationship type, the department will play the role of department manager.

Similarly, if we consider the project entity type, please guess the roles played.

The ER-Diagram with all the roles of the entity types concerning the relationships is as shown below.

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

The use of the role names is helpful in recursive relationships, which we will discuss in the next class.