SlideShare a Scribd company logo
ER Diagrams
To be discussed:-
 Entity
 Attribute
 Types of Attribute
 Relationship
 ER Diagram Representation
 Generalization
 Specialization
 Inheritance
 Codd’s 12 Rule
 Relational Data Model
 ER Model to Relational Model
Entity
 An entity can be a real-world object, either
animate or inanimate, that can be easily
identifiable. Example : School Database
 Teachers
 Students
 Classes
 Courses offered
Entity set
 An entity set is a collection of similar types of
entities. An entity set may contain entities
with attribute sharing similar values.
Attributes
Entities are represented by means of their properties,
called attributes. All attributes have
values. Example : Student :- Name, Class, Age
Types of Attributes
 Simple attribute − Simple attributes are atomic
values, which cannot be divided further. For
example, a student's phone number is an atomic
value of 10 digits.
 Composite attribute − example, a student's
complete name may have first_name and
last_name.
Types of Attributes Continue…..
 Derived attribute − example, average_salary in a
department should not be saved directly in the database,
instead it can be derived.
 For another example, age can be derived from
data_of_birth.
 Single-value attribute − Single-value attributes contain
single value. example −: Social_Security_Number.
 Multi-value attribute − Multi-value attributes may contain
more than one values.
 Example: a person can have more than one phone
number, email_address, etc.
Relationship
 The association among entities is called
relationship.
 Ex: Employee works_at department
 Ex: Student enrolls in a course
 Relationship Set
A set of relationships of similar type is called a
relationship set. Like entities, a relationship too
can have attributes. These attributes are
called descriptive attributes.
Mapping cardinalities
 Cardinality defines the number of entities in
one entity set, which can be associated with
the number of entities of other set via
relationship set.
 One to one
One to many
Many to one
Many to many
One to One
Entity set A Entity
set B
One to many
Entity set A Entity
set B
Many to one
Entity set A Entity
set B
Many to many
Entity set A Entity
set B
ER Diagram Representation
 Entity
 Attributes
Teacher Student Classes
Studen
t
Nam
e
Roll
Birth_Dat
e
ER Diagram Representation Continue…
 Composite
Studen
t
Nam
e
Roll
Birth_Dat
e
Last
First
ER Diagram Representation Continue…
 Multivalued
Studen
t
Nam
e
Roll
Birth_Dat
e
Last
First
Phone_No
ER Diagram Representation Continue…
 Derived
Studen
t
Nam
e
Roll
Birth_Dat
e
Last
First
Phone_No
Age
ER Diagram Representation Continue…
 Relationship
 Binary Relationship and Cardinality
When two entities participate in a relationship then it
is called Binary Relationship.
Cardinality is the number of instance of an entity from
a relation that can be associated with the relation.
ER Diagram Representation Continue…
 One to One (1:1)
1 1
Example : Person – Passport
Student – Roll-No
Relationshi
p EntityEntity
ER Diagram Representation Continue…
 One to Many (1:N)
1 N
Example : Mother- Children
Student - Address
Relationshi
p EntityEntity
ER Diagram Representation Continue…
 Many to One (N:1)
N 1
Example : Students - Teacher
Relationshi
p EntityEntity
ER Diagram Representation Continue…
 Many to One (M:N)
M N
Example : - Books - Authors
Relationshi
p EntityEntity
ER Diagram Representation Continue…
 Participation Constraint
Total participation Partial participation
Relationshi
p EntityEntity
 The ER Model has the power of expressing
database entities in a conceptual hierarchical
manner. As the hierarchy goes up, it generalizes
the view of entities, and as we go deep in the
hierarchy, it gives us the detail of every entity
included.
Going up in this structure is called Generalization
Reverse is called Specialization
Generalization and Specialization
Generalization
Pigeon
Birds
Peacoc
kSparrow
Specialization
Person
Teache
r
Student
IS A
Inheritance
Person
Nam
e
Gende
r
Birth_Dat
e
Teache
r
Student
EMP_IDRoll
IS A
Relational Data Model
 Relational data model is the primary data model,
which is used widely around the world for data
storage and processing.
 Concepts
 Touple
 Relation Instance
 Relation Schema
 Relation key
 Attribute domain
Key Constraints
 Key constraints
Primary Key
Foreign Key
Candidate Key
Alternate Key
Key Constraints ….
 Key constraints force that −
 in a relation with a key attribute, no two tuples can
have identical values for key attributes.
 a key attribute can not have NULL values.
 Domain constraints
 Every attribute is bound to have a specific range of values.
 Example : Age can not be negative
 Referential integrity constraints
Key Constraints ….
 Referential integrity constraints
Every relation has some conditions that must hold for
it to be a valid relation. These conditions are
called Relational Integrity Constraints.
I If a relation refers to a key attribute of a different or
same relation, then that key element must exist.
ER model to Relational Model
 ER model
 Entity
 Attributes
 Mapping Entity
 Create table for each entity.
 Entity's attributes should become fields of tables with their
respective data types.
 Declare primary key.
ER model to Relational Model
 Mapping Relationship
 Create table for a relationship.
 Add the primary keys of all participating Entities as
fields of table with their respective data types.
 If relationship has any attribute, add each attribute
as field of table.
 Declare a primary key composing all the primary
keys of participating entities.
 Declare all foreign key constraints.
ER model to Relational Model
 Mapping Weak entity set
 Create table for weak entity set.
 Add all its attributes to table as field.
 Add the primary key of identifying entity set.
 Declare all foreign key constraints.

More Related Content

ODP
ER Model in DBMS
Kabindra Koirala
 
PPT
Entity Relationship Diagram
Shakila Mahjabin
 
PPTX
Er diagram
Sabana Maharjan
 
PPT
2. Entity Relationship Model in DBMS
koolkampus
 
PPT
ER-Model-ER Diagram
Saranya Natarajan
 
PPTX
ER DIAGRAM & ER MODELING IN DBMS
ssuser20b618
 
PPTX
Entity Relationship Diagrams
sadique_ghitm
 
PPTX
ER Modeling and Introduction to RDBMS
Rubal Sagwal
 
ER Model in DBMS
Kabindra Koirala
 
Entity Relationship Diagram
Shakila Mahjabin
 
Er diagram
Sabana Maharjan
 
2. Entity Relationship Model in DBMS
koolkampus
 
ER-Model-ER Diagram
Saranya Natarajan
 
ER DIAGRAM & ER MODELING IN DBMS
ssuser20b618
 
Entity Relationship Diagrams
sadique_ghitm
 
ER Modeling and Introduction to RDBMS
Rubal Sagwal
 

What's hot (20)

PPT
Entity relationship modelling
Dr. C.V. Suresh Babu
 
PPTX
Entity Relationship Modelling
Bhandari Nawaraj
 
PPT
data modeling and models
sabah N
 
PPT
1. Introduction to DBMS
koolkampus
 
PPTX
Er model ppt
Pihu Goel
 
PPT
Basic DBMS ppt
dangwalrajendra888
 
PPTX
ER MODEL
Rupali Rana
 
PDF
Enhanced Entity-Relationship (EER) Modeling
sontumax
 
PPT
Data models
Usman Tariq
 
PPTX
Introduction to Database
Siti Ismail
 
PPTX
All data models in dbms
Naresh Kumar
 
PPTX
Data Modeling PPT
Trinath
 
PPTX
Structure of dbms
Megha yadav
 
PPT
Entity relationship diagram (erd)
tameemyousaf
 
PPTX
Acid properties
Abhilasha Lahigude
 
PPT
3 Tier Architecture
guestd0cc01
 
PPTX
Integrity Constraints
Megha yadav
 
PPT
ER Diagram
Robby Firmansyah
 
PPTX
The Relational Database Model
Shishir Aryal
 
PPSX
ADO.NET
Farzad Wadia
 
Entity relationship modelling
Dr. C.V. Suresh Babu
 
Entity Relationship Modelling
Bhandari Nawaraj
 
data modeling and models
sabah N
 
1. Introduction to DBMS
koolkampus
 
Er model ppt
Pihu Goel
 
Basic DBMS ppt
dangwalrajendra888
 
ER MODEL
Rupali Rana
 
Enhanced Entity-Relationship (EER) Modeling
sontumax
 
Data models
Usman Tariq
 
Introduction to Database
Siti Ismail
 
All data models in dbms
Naresh Kumar
 
Data Modeling PPT
Trinath
 
Structure of dbms
Megha yadav
 
Entity relationship diagram (erd)
tameemyousaf
 
Acid properties
Abhilasha Lahigude
 
3 Tier Architecture
guestd0cc01
 
Integrity Constraints
Megha yadav
 
ER Diagram
Robby Firmansyah
 
The Relational Database Model
Shishir Aryal
 
ADO.NET
Farzad Wadia
 
Ad

Viewers also liked (20)

PPTX
How to Draw an Effective ER diagram
Tech_MX
 
PPTX
Entity Relationship Diagram presentation
Sopov Chan
 
PDF
DBMS topics for BCA
Adbay
 
PPTX
Library mangement-system
Rafiul Rafi
 
PDF
Er diagram practical examples
Rahul Khanwani
 
PPTX
Erd practice exercises
Jennifer Polack
 
PPTX
Database - Entity Relationship Diagram (ERD)
Mudasir Qazi
 
PPTX
School Management System
Northeastern University
 
PPT
ER DIAGRAM TO RELATIONAL SCHEMA MAPPING
ARADHYAYANA
 
PPT
Time manipulation lecture 2
Mudasir Syed
 
PPT
DBMS PPT
Prabhu Goyal
 
PPT
PHP mysql Er diagram
Mudasir Syed
 
PDF
Chap2 practice key
IIUM
 
PPT
Erd cardinality
Inge Powell
 
PDF
Try PostgreSQL on linux
Aey Unthika
 
PPT
Er diagram
LOKENDRA PRAJAPATI
 
PDF
Vanson Bourne Data Summary: Shadow IT - BDMs
Vanson Bourne
 
PPTX
Discrete Random Variable
Md Abdullah Al Mayin
 
PPTX
00137
prashnant
 
PPT
Mapping
Samir Sabry
 
How to Draw an Effective ER diagram
Tech_MX
 
Entity Relationship Diagram presentation
Sopov Chan
 
DBMS topics for BCA
Adbay
 
Library mangement-system
Rafiul Rafi
 
Er diagram practical examples
Rahul Khanwani
 
Erd practice exercises
Jennifer Polack
 
Database - Entity Relationship Diagram (ERD)
Mudasir Qazi
 
School Management System
Northeastern University
 
ER DIAGRAM TO RELATIONAL SCHEMA MAPPING
ARADHYAYANA
 
Time manipulation lecture 2
Mudasir Syed
 
DBMS PPT
Prabhu Goyal
 
PHP mysql Er diagram
Mudasir Syed
 
Chap2 practice key
IIUM
 
Erd cardinality
Inge Powell
 
Try PostgreSQL on linux
Aey Unthika
 
Er diagram
LOKENDRA PRAJAPATI
 
Vanson Bourne Data Summary: Shadow IT - BDMs
Vanson Bourne
 
Discrete Random Variable
Md Abdullah Al Mayin
 
00137
prashnant
 
Mapping
Samir Sabry
 
Ad

Similar to Er diagrams presentation (20)

PPTX
UNIT 1-RELATIONAL DATA MODEL for data base subject
poonkodiraja2806
 
PPT
ermodelN in database management system.ppt
urvashipundir04
 
PPT
ER Diagram introduction .ppt
sivamathi12
 
PPT
3144-unit-1entityrmodel-171122051336.ppt
Uma Kakarlapudi
 
PPT
18306_lec-2 (1).ppt
IshuIswarya3
 
PPTX
Er model
Soumyajit Dutta
 
PPTX
er-models.pptx
UmmerFarooq24
 
PPTX
Data model and entity relationship
Knowledge Center Computer
 
PPTX
42_16SCCCS4_20200520053835884587894.pptx
atulshukla4345
 
PPTX
database
MonirHossain707319
 
PPTX
Data Models and Relational Database Design.pptx
niqqaanonymous211
 
PDF
Lecture one db
Huda Alameen
 
PDF
Unit 2 DBMS
DhivyaSubramaniyam
 
PPTX
Unit iv dbms
Arnav Chowdhury
 
PPTX
E_R-Diagram (2).pptx
sandeep54552
 
PPTX
rdbms3, dbms,dbms,rdbmssssssssssssssssssssssssssssssssss
VaibhavSrivastav52
 
PPTX
DBMS: ER Model Basics with a good description
vidhiaryaduhan
 
PPTX
ER MODEL.pptx
TusharSingh711352
 
PPTX
Entity Relationship Diagram – ER Diagram in DBMS.pptx
farsankadavandy
 
PPTX
Er model
gagan bhattarai
 
UNIT 1-RELATIONAL DATA MODEL for data base subject
poonkodiraja2806
 
ermodelN in database management system.ppt
urvashipundir04
 
ER Diagram introduction .ppt
sivamathi12
 
3144-unit-1entityrmodel-171122051336.ppt
Uma Kakarlapudi
 
18306_lec-2 (1).ppt
IshuIswarya3
 
Er model
Soumyajit Dutta
 
er-models.pptx
UmmerFarooq24
 
Data model and entity relationship
Knowledge Center Computer
 
42_16SCCCS4_20200520053835884587894.pptx
atulshukla4345
 
Data Models and Relational Database Design.pptx
niqqaanonymous211
 
Lecture one db
Huda Alameen
 
Unit 2 DBMS
DhivyaSubramaniyam
 
Unit iv dbms
Arnav Chowdhury
 
E_R-Diagram (2).pptx
sandeep54552
 
rdbms3, dbms,dbms,rdbmssssssssssssssssssssssssssssssssss
VaibhavSrivastav52
 
DBMS: ER Model Basics with a good description
vidhiaryaduhan
 
ER MODEL.pptx
TusharSingh711352
 
Entity Relationship Diagram – ER Diagram in DBMS.pptx
farsankadavandy
 
Er model
gagan bhattarai
 

Recently uploaded (20)

PDF
BÀI TẬP TEST BỔ TRỢ THEO TỪNG CHỦ ĐỀ CỦA TỪNG UNIT KÈM BÀI TẬP NGHE - TIẾNG A...
Nguyen Thanh Tu Collection
 
PPTX
Gupta Art & Architecture Temple and Sculptures.pptx
Virag Sontakke
 
PPTX
A Smarter Way to Think About Choosing a College
Cyndy McDonald
 
PPTX
20250924 Navigating the Future: How to tell the difference between an emergen...
McGuinness Institute
 
PDF
What is CFA?? Complete Guide to the Chartered Financial Analyst Program
sp4989653
 
PPTX
Command Palatte in Odoo 18.1 Spreadsheet - Odoo Slides
Celine George
 
PPTX
Cleaning Validation Ppt Pharmaceutical validation
Ms. Ashatai Patil
 
PPTX
Sonnet 130_ My Mistress’ Eyes Are Nothing Like the Sun By William Shakespear...
DhatriParmar
 
PPTX
HISTORY COLLECTION FOR PSYCHIATRIC PATIENTS.pptx
PoojaSen20
 
PPTX
Tips Management in Odoo 18 POS - Odoo Slides
Celine George
 
PPTX
How to Close Subscription in Odoo 18 - Odoo Slides
Celine George
 
PPTX
Introduction to pediatric nursing in 5th Sem..pptx
AneetaSharma15
 
PPTX
PROTIEN ENERGY MALNUTRITION: NURSING MANAGEMENT.pptx
PRADEEP ABOTHU
 
PPTX
HEALTH CARE DELIVERY SYSTEM - UNIT 2 - GNM 3RD YEAR.pptx
Priyanshu Anand
 
PPTX
Virus sequence retrieval from NCBI database
yamunaK13
 
PPTX
Continental Accounting in Odoo 18 - Odoo Slides
Celine George
 
DOCX
Modul Ajar Deep Learning Bahasa Inggris Kelas 11 Terbaru 2025
wahyurestu63
 
PPTX
CONCEPT OF CHILD CARE. pptx
AneetaSharma15
 
PDF
Biological Classification Class 11th NCERT CBSE NEET.pdf
NehaRohtagi1
 
PPTX
Measures_of_location_-_Averages_and__percentiles_by_DR SURYA K.pptx
Surya Ganesh
 
BÀI TẬP TEST BỔ TRỢ THEO TỪNG CHỦ ĐỀ CỦA TỪNG UNIT KÈM BÀI TẬP NGHE - TIẾNG A...
Nguyen Thanh Tu Collection
 
Gupta Art & Architecture Temple and Sculptures.pptx
Virag Sontakke
 
A Smarter Way to Think About Choosing a College
Cyndy McDonald
 
20250924 Navigating the Future: How to tell the difference between an emergen...
McGuinness Institute
 
What is CFA?? Complete Guide to the Chartered Financial Analyst Program
sp4989653
 
Command Palatte in Odoo 18.1 Spreadsheet - Odoo Slides
Celine George
 
Cleaning Validation Ppt Pharmaceutical validation
Ms. Ashatai Patil
 
Sonnet 130_ My Mistress’ Eyes Are Nothing Like the Sun By William Shakespear...
DhatriParmar
 
HISTORY COLLECTION FOR PSYCHIATRIC PATIENTS.pptx
PoojaSen20
 
Tips Management in Odoo 18 POS - Odoo Slides
Celine George
 
How to Close Subscription in Odoo 18 - Odoo Slides
Celine George
 
Introduction to pediatric nursing in 5th Sem..pptx
AneetaSharma15
 
PROTIEN ENERGY MALNUTRITION: NURSING MANAGEMENT.pptx
PRADEEP ABOTHU
 
HEALTH CARE DELIVERY SYSTEM - UNIT 2 - GNM 3RD YEAR.pptx
Priyanshu Anand
 
Virus sequence retrieval from NCBI database
yamunaK13
 
Continental Accounting in Odoo 18 - Odoo Slides
Celine George
 
Modul Ajar Deep Learning Bahasa Inggris Kelas 11 Terbaru 2025
wahyurestu63
 
CONCEPT OF CHILD CARE. pptx
AneetaSharma15
 
Biological Classification Class 11th NCERT CBSE NEET.pdf
NehaRohtagi1
 
Measures_of_location_-_Averages_and__percentiles_by_DR SURYA K.pptx
Surya Ganesh
 

Er diagrams presentation

  • 2. To be discussed:-  Entity  Attribute  Types of Attribute  Relationship  ER Diagram Representation  Generalization  Specialization  Inheritance  Codd’s 12 Rule  Relational Data Model  ER Model to Relational Model
  • 3. Entity  An entity can be a real-world object, either animate or inanimate, that can be easily identifiable. Example : School Database  Teachers  Students  Classes  Courses offered Entity set  An entity set is a collection of similar types of entities. An entity set may contain entities with attribute sharing similar values.
  • 4. Attributes Entities are represented by means of their properties, called attributes. All attributes have values. Example : Student :- Name, Class, Age Types of Attributes  Simple attribute − Simple attributes are atomic values, which cannot be divided further. For example, a student's phone number is an atomic value of 10 digits.  Composite attribute − example, a student's complete name may have first_name and last_name.
  • 5. Types of Attributes Continue…..  Derived attribute − example, average_salary in a department should not be saved directly in the database, instead it can be derived.  For another example, age can be derived from data_of_birth.  Single-value attribute − Single-value attributes contain single value. example −: Social_Security_Number.  Multi-value attribute − Multi-value attributes may contain more than one values.  Example: a person can have more than one phone number, email_address, etc.
  • 6. Relationship  The association among entities is called relationship.  Ex: Employee works_at department  Ex: Student enrolls in a course  Relationship Set A set of relationships of similar type is called a relationship set. Like entities, a relationship too can have attributes. These attributes are called descriptive attributes.
  • 7. Mapping cardinalities  Cardinality defines the number of entities in one entity set, which can be associated with the number of entities of other set via relationship set.  One to one One to many Many to one Many to many
  • 8. One to One Entity set A Entity set B
  • 9. One to many Entity set A Entity set B
  • 10. Many to one Entity set A Entity set B
  • 11. Many to many Entity set A Entity set B
  • 12. ER Diagram Representation  Entity  Attributes Teacher Student Classes Studen t Nam e Roll Birth_Dat e
  • 13. ER Diagram Representation Continue…  Composite Studen t Nam e Roll Birth_Dat e Last First
  • 14. ER Diagram Representation Continue…  Multivalued Studen t Nam e Roll Birth_Dat e Last First Phone_No
  • 15. ER Diagram Representation Continue…  Derived Studen t Nam e Roll Birth_Dat e Last First Phone_No Age
  • 16. ER Diagram Representation Continue…  Relationship  Binary Relationship and Cardinality When two entities participate in a relationship then it is called Binary Relationship. Cardinality is the number of instance of an entity from a relation that can be associated with the relation.
  • 17. ER Diagram Representation Continue…  One to One (1:1) 1 1 Example : Person – Passport Student – Roll-No Relationshi p EntityEntity
  • 18. ER Diagram Representation Continue…  One to Many (1:N) 1 N Example : Mother- Children Student - Address Relationshi p EntityEntity
  • 19. ER Diagram Representation Continue…  Many to One (N:1) N 1 Example : Students - Teacher Relationshi p EntityEntity
  • 20. ER Diagram Representation Continue…  Many to One (M:N) M N Example : - Books - Authors Relationshi p EntityEntity
  • 21. ER Diagram Representation Continue…  Participation Constraint Total participation Partial participation Relationshi p EntityEntity
  • 22.  The ER Model has the power of expressing database entities in a conceptual hierarchical manner. As the hierarchy goes up, it generalizes the view of entities, and as we go deep in the hierarchy, it gives us the detail of every entity included. Going up in this structure is called Generalization Reverse is called Specialization Generalization and Specialization
  • 26. Relational Data Model  Relational data model is the primary data model, which is used widely around the world for data storage and processing.  Concepts  Touple  Relation Instance  Relation Schema  Relation key  Attribute domain
  • 27. Key Constraints  Key constraints Primary Key Foreign Key Candidate Key Alternate Key
  • 28. Key Constraints ….  Key constraints force that −  in a relation with a key attribute, no two tuples can have identical values for key attributes.  a key attribute can not have NULL values.  Domain constraints  Every attribute is bound to have a specific range of values.  Example : Age can not be negative  Referential integrity constraints
  • 29. Key Constraints ….  Referential integrity constraints Every relation has some conditions that must hold for it to be a valid relation. These conditions are called Relational Integrity Constraints. I If a relation refers to a key attribute of a different or same relation, then that key element must exist.
  • 30. ER model to Relational Model  ER model  Entity  Attributes  Mapping Entity  Create table for each entity.  Entity's attributes should become fields of tables with their respective data types.  Declare primary key.
  • 31. ER model to Relational Model  Mapping Relationship  Create table for a relationship.  Add the primary keys of all participating Entities as fields of table with their respective data types.  If relationship has any attribute, add each attribute as field of table.  Declare a primary key composing all the primary keys of participating entities.  Declare all foreign key constraints.
  • 32. ER model to Relational Model  Mapping Weak entity set  Create table for weak entity set.  Add all its attributes to table as field.  Add the primary key of identifying entity set.  Declare all foreign key constraints.