An Entity, Entity Type, Entity Set, Weak Entity Set


An Entity is a real-world object which may have a physical existence like any person, student, etc., or may have a conceptual existence like a job, company, etc. which has characteristics and holds relationships in DBMS. It is an object which can be distinguished from others, if it’s not distinguishable then it’s not an entity.  

An entity is of two types :

  • Tangible Entity: These entities exist in the real world physically. Ex. Person, television, etc.
  • Intangible Entity: These entities exist only logically and have no physical existence. Ex. The enrollment number of any student.

Entity Type

An Entity Type refers to the category a particular entity belongs to. It is a collection of the entity having similar attributes. An entity type in an ER diagram is defined by a name(here, STUDENT) and a set of attributes(here, Roll_no, Student_name, Age, Mobile_no).

We use a rectangle to represent an entity type in the E-R diagram.

Types of Entity Type :

  • Strong Entity Type: Strong entities are those entity types that have a key attribute.
  • Weak Entity Type: Weak entity type doesn’t have a key attribute and can’t be identified on its own. 

Entity Set

An Entity Set is a set of entities, a collection of entities having the same entity type. 

For example: if a student is an entity then, the set of all students is an entity set.  

Weak Entity Set

An entity set that does not have a primary key is referred to as a weak entity set. An entity type should have a key attribute that uniquely identifies each entity in the entity set, but there exists some entity type for which a key attribute can’t be defined, these are called weak entity types.

For example :

  1. payment-number – discriminator of the payment entity set
  2. The primary key for payment– loan-number, payment-number.