White Dry-erase Board With Red Diagram

Hey guys ! I am back with another article about SQL (A powerful Language).
Here I am gonna discuss about the ER diagram. Why are they Important? How to represent them?


ER diagram is  representation of  of entities and relation between instances between their entities.

sounds somewhat strange? confused by the keywords? Here we go!

What is an entity?
An Entity is a person, place or thing or event distinguishable. unique and distinct.

A car , its an entity.
Taj mahal. an entity.
Mahesh, an entity.

Attribute: It is a characteristic of an entity.
If you take car as an entity. Its Attributes(characteristics) are :


  • It has wheels.
  • It is made of metal.
  • It has more speed





What is Relationship?
It is relationship between a boy and a girl!!😁 kidding.
Relationship describes association among entities.

Different types of Relationship between entities.
  • one to one 
  • one to many
  • many to many
Different types of ER diagram notations:
  • Chen Notation
  • Crow's Foot Notation
  • UML Class diagram notation
Chen Notation: 
  • In this type of notation the entities are represented in 2 seperate boxes and the relationship between them is is represented in a quadrilateral(kite like structure).
  • one is represented by '1' ans many is represented by 'M'

one to one: one boy loves one girl (if they are true lovers).






One to many: One person can read many posts on my blog





Many to many





Crow's Foot notation: 
In this notation the entities are represented in 2 seperate boxes .
Relationship is represented above the line connection them.
One is represented by 2 parallel lines (||) and many is represented by crow's Feet.

One to one:






One to many :






Many to many :





UML class diagram notation:

IN this notation the entities in 2 seperate boxes.
Relationship is written beside both the 2 entities.
one is represented by '1.1' and many is represented by '1.*'.

One to one:

One to many:






Many to many:






stay tuned for the commands in SQL.!



Post a Comment

Previous Post Next Post