Types of Entity Relationships in DBMS


Entity in DBMS can be a real-world object with an existence, For example, in a Company database, the entities can be Employees, Department, Project, etc. In a College database, the entities are Profession, Students, Result, Activities, etc.

An entity is represented as a single rectangle, shown below

The following are the entity relationships −

One-to-One Relationship

Under One-to-One (1:1) relationship, an instance of entity P is related to instance of entity Q and an instance of entity Q is related to instance of entity P.

Let us see an example −

A person can have only one passport, and a passport is assigned to a single person.

One-to-Many Relationship

Under One-to-Many (1:N) relationship, an instance of entity P is related to more than one instance of entity Q and an instance of entity Q is related to more than one instance of entity P.

Let us see an example −

A Person can have more than one Bank Accounts but a bank account can have at most one person as account holder.

Many-to-Many Relationship

Under Many-to-Many (N:N) relationship, more than one instance of entity P is related to more than one instance of entity Q. For more than one instance of entity Q is related to more than one instance of entity P.

Let us see an example −

A person can have more than one skills. More than one person can attain a skill.

Updated on: 15-Jun-2020

4K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements