Identifying the Relationship Types between the Entity Types
For Complete YouTube Video: Click Here
In this class, we will understand Identifying the Relationship Types between the Entity Types.
We have already Identified the entity types.
Table of Contents
Identifying the Relationship Types between the Entity Types
Among those entity types, there exists some relationship.
The definition of the database states that the database is a collection of related data.
In our previous lecture, we have identified four entity types Employee, Department, Project, and Dependents.
All those entity types are related to the company database.
How to identify the relationships among the entity types?
In this class, we will consider only Employee and Department entity types.
From the above entity types, how can we identify the relationship.?
Whenever an attribute of one entity type refers to another entity type, some relationship exists.
If we observe the department attribute of an employee entity type is related to the department entity type.
If any such attributes exist among the entity types, there is a relationship type, and we have to identify them.
What is the Relationship?
The relationship is works_for.
An employee works_for a department.
Note: As the department attribute of the employee entity has been converted into a relationship we can remove the attribute from the entity type.
ER-Diagram Representation
We represent the relationships in a diamond shape, as shown below.
Note: For better clarity of the image we have removed some of the attributes of Employee and Department Entity type.