Weak Entity and Strong Entity in DBMS

Weak Entity And Strong Entity in DBMS

In this article, we will learn about Weak Entity and Strong Entity in DBMS.

The entity defines the type of data stored, simply it is nothing but a database table . We have the following two types of entities based on Unique Identification –

  • Strong entity
  • Weak entity
Weak Entity and Strong Entity

Strong entity 

  • Strong Entity is independent of any other entity in the schema

Example – A student entity can exist without needing any other entity in the schema or a course entity can exist without needing any other entity in the schema

  • A Strong entity is nothing but an entity set  having a primary key attribute or a table that consists of a primary key column
Representation 
    • The strong entity is represented by a single rectangle.
    • The relationship between two strong entities is represented by a single diamond.
Strong Entity and Weak entity in DBMS
Examples for the strong entity 
    • Consider the ER diagram which consists of two entities student and course
    • Student entity is a strong entity because it consists of a primary key called student id which is enough for accessing  each record uniquely
    • In the same way, the course entity contains of course ID attribute which is capable of uniquely accessing each row.

Weak entity 

  • A weak entity is an entity set that does not have sufficient attributes for Unique Identification of its records.

Example 1 – A loan entity can not be created for a customer if the customer doesn’t exist

Example 2 – A dependents list entity can not be created if the employee doesn’t exist

  • Simply a weak entity is nothing but an entity that does not have a primary key attribute 
  • It contains a partial key called a discriminator which helps in identifying a group of entities from the entity set 
  • A discriminator is represented by underlining with a dashed line 
 Representation 
    • A double rectangle is used for representing a weak entity set
    • The double diamond symbol is used for representing the relationship between a strong entity and a weak entity which is known as identifying relationship 
Strong Entity and Weak entity in DBMS – 2
Strong Entity and Weak entity in DBMS – 3

Example for weak entity

    • In the ER diagram, we have two entities Employee and Dependents.
    • Employee is a strong entity because it has a primary key attribute called Employee number (Employee_No) which is capable of uniquely identifying all the employee.
    • Unlike Employee, Dependents is weak entity because it does not have any primary key .
    • D_Name along with the Employee_No can uniquly identfy the records of Depends. So here the D_Name (Depends Name) is partial key.

Strong entity vs Weak entity 

Strong entity 
  • Strong entity always has a primary key
  • It is not dependent on any other entity
  • Represented by a single rectangle 
  • Relationship between two strong entities is represented by a single diamond
  • A strong entity may or may not have total participation
Weak entity
  • Will not have a primary key but it has partial discriminator key 
  • Which entity is dependent on the strong entity
  • Represented by double rectangle relationship between a strong entity and the weak entity is represented by double Diamond
  • It has always total participation

Learn more about DBMS here on this page.

Strong Entity Set