Open In App

Difference between entity, entity set and entity type

The ER model is a very important concept in DBMS, and it is used for the modeling of the logical view of the system from a data perspective. The entity, Entity Set, and Entity Type all these terms are very important concepts of ER Model. In this article, we will understand the difference between them.

1. Entity : An entity is a thing in a real-world with independent existence. An entity can exist independently and is distinguishable from other objects. It can be identified uniquely.



An entity can be of two types :

Example : 



Note :

2. Entity Type : It refers to the category that a particular entity belongs to.

    

Example :

Note :

3. Entity Set : An entity set is a collection or set of all entities of a particular entity type at any point in time. The type of all the entities should be the same.

Example :

Note : 

Relation With Table :

Consider a table student as follows :

Table Name : Student

Student_ID Student_Name Student_Age Student_Gender
1 Avi 19 M
2 Ayush 23 M
3 Nikhil 21 M
4 Riya 16 F

Entity : Each row is an entity. 

Example :

1 Avi 19 M

Entity Type : Each entity belongs to the student type. Hence, the type of entity here is a student.

Entity Set : The complete data set of all entities is called entity set. For the above table, the records with student id 1, 2, 3, 4 are the entity set.

Difference Table :

Entity Entity Type Entity Set
A thing in the real world with independent existence A category of a particular entity  Set of all entities of a particular entity type.  
Any particular row (a record) in a relation(table) is known as an entity. The name of a relation (table) in RDBMS is an entity type All rows of a relation (table) in RDBMS is entity set
Article Tags :