DBMS Notes

Entity in ER Model

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 rollno, Student_name etc.

Keep in mind,

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

Let understand the terms entity, entity type, entity set and schema through 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.
  • 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 strong and weak entity

The relation in-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 is fully participating in relation. And every customer does not acquire the loan. so, customer is partially participating in relation.

Difference between Strong and Weak Entity

S.NO Strong Entity Weak Entity
1. Strong entity always contains a primary key. Weak entity has no primary key.
2. As strong entity does not dependent to any other entity. While a Weak entity is dependent on strong entity.
3. Strong entity has either total participation or not. Weak entity always has the total participation.
4. Strong entity is represented by single rectangle. A Weak entity is represented by double rectangle.
5. Relationship in-between Two strong entities’ is represented by single diamond symbol. Relationship between one strong and one weak entity is represented by double diamond symbol.

Help Other’s By Sharing…

Contact Us

Burewala, Vehari, Punjab, Pakistan

cstaleem1@gmail.com

Website: CStaleem.com

Pin It on Pinterest