Entity in ER Model

The entity is any physical object, which may be a human, place, thing, or any event, i.e., student, chair, Lahore, etc. Each entity contains some attributes, i.e., student entity attributes are roll no, Student_name, etc.

Keep in mind,

  • Entity Set is a set of the same type of entities
  • The structure of an entity with its attributes is known as schema.
  • Entity type tells the information about that entity

Let’s understand the terms entity, entity type, entity set, and schema through the following diagram

Note: Roll_No, Student_Name, Student_age, Student_City are the attributes of Entity Type(Student).

Types of Entity Set in ER Model

An entity set is of two types

1. Strong Entity Set

  • A strong entity set contains its own primary key.
  • the single rectangle represents it.

For example: A US Bank can uniquely identify by its bank number.

2. Weak Entity Set

  • A weak entity set do not hold its own primary key.
  • To uniquely identify any tuple of weak entity, attributes of weak entity is combined with strong entity primary key.
  • double rectangle represents the weak entity.

Note: An entity that depends on another entity is considered as a weak entity.

Relationship between a strong and weak entity

The relation between one strong and one weak entity is represented by a double diamond symbol.

As Loan must be taken by some customer. So, the loan fully participates in relation. And not every customer acquires the loan. so the customer is partially participating in relation.

Difference between Strong and Weak Entity

S.NO Strong Entity Weak Entity
1. A strong entity always contains a primary key. The weak entity has no primary key.
2. A strong entity is not dependent on any other entity. Meanwhile, a weak entity is dependent on a strong entity.
3. The strong entity has either total participation or not. Weak entity always has the total participation.
4. The strong entity is represented by a single rectangle. A Weak entity is represented by a double rectangle.
5. The relationship between two strong entities is represented by the single diamond symbol. The relationship between one strong and one weak entity is represented by the double diamond symbol.