Skip to content
Related Articles

Related Articles

Improve Article

Difference between entity, entity set and entity type

  • Difficulty Level : Basic
  • Last Updated : 16 Jul, 2021

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 :

  • Tangible Entity : Entities that exist in the real world physically. Example: Person, car, etc.
  • Intangible Entity : Entities that exist only logically and have no physical existence. Example: Bank Account, etc.

Example : 

  •  A student with a particular roll number is an entity.
  • A company with a particular registration number is an entity.

Note :



  • An entity may be concrete like a student, a book, or abstract like a holiday or a particular concept.
  • An entity is represented by a set of attributes.
  • In a particular relation in RDBMS, a particular record is called an entity.

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

    

Example :

  • A table named student in a university database.
  • A table named employee in a company database.

Note :

  • The category of a particular entity in the relation in RDBMS is called the entity type.
  • It is represented by the name of the table and its schema.

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 :



  • The collection of all the students from the student table at a particular instant of time is an example of an entity set.
  • The collection of all the employees from the employee table at a particular instant of time is an example of an entity set.

Note : 

  • Entity sets need not be disjoint. For example, the entity set of Article Writer (all content creators for GeeksforGeeks) and the entity set of Article Reader (all students who read the article of GeeksforGeeks) may have members in common.
  • The collection of all the entities in the relation of RDBMS is called an entity set.

Relation With Table :

Consider a table student as follows :

Table Name : Student

Student_IDStudent_NameStudent_AgeStudent_Gender
1Avi19M
2Ayush23M
3Nikhil21M
4Riya16F

Entity : Each row is an entity. 

Example :

1Avi19M

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 :

EntityEntity TypeEntity Set
A thing in the real world with independent existenceA 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 typeAll rows of a relation (table) in RDBMS is entity set

Attention reader! Don’t stop learning now.  Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.

Learn all GATE CS concepts with Free Live Classes on our youtube channel.

My Personal Notes arrow_drop_up
Recommended Articles
Page :