SlideShare a Scribd company logo
1 of 25
Database Management
Entity – Relationship (ER) Diagram
Prof. Sridhar Vaithianathan
DATA MODELING
A Data Model is a map or diagram that
represents entities and their relationships.
Some Definitions
 A File/Entity/Table: A group or collection of
similar records
 A record / Tuple: one piece of data, i.e., one
student's information, a recipe, a test question.
 Records = rows
 A field/Attributes: one category of information,
i.e., Name, Address, Semester Grade, Academic
topic
 (Fields = columns)
ER Diagram - Example
CARDINALITY AND MODALITY
Entity Relationship Diagram - Notation
Entitiy
Relationship
Associated Object
Mandatory (Exactly) One
Optional (Zero or one) One
Mandatory Many
Optional Many
Optional
Mandatory
E – R Diagram Example
Basket Ball Game
Entities:
Home Stadium
Team
Player
Games
ER – Diagram Example – Basket Ball Game
HOME
STADIUM TEAM
PLAYER
Has
Has
GAME
Participates
Has
Entities, Attributes and Relationship
 Strong Entity Vs Weak entity ( EMPLOYEE &
DEPENDENT)
 Simple Vs Composite Attributes
 Single Valued Vs Multi Valued Attributes
 Stored Vs Derived Attributes
 Identifier Attribute – Primary Key
 Composite Identifier
 Foreign Key
 Sub-Type Vs Super Type Relationship
Database Associations Example
HOME STADIUM
Stadium Id Stadium Name, Capacity, Location
TEAM
Team Id Team Name
PLAYER
Player Id Player Name, Position
GAME
Team id(1) Team id(2) Date Final Score
B
A
S
K
E
T
B
A
L
L
G
A
M
E
Relationship Example Instructions
One-to-One.
TEAM
Team Id Team Name,
Stadium Id
Each team has only one home
stadium, and each home
stadium has only one team.
STADIUM and TEAM
Place the primary key from
one entity to other entity as a
foreign key and vice versa.
(i.e. foreign key can be placed
at either side of the
relationship.)
One-to-Many
PLAYER
Player Id Player
Name, Position, Team Id
Each player is on only one
team, but each team has many
players.
PLAYER and TEAM
Place the primary key from
the entity on the one side of
the relationship as a foreign
key in the table for the entity
on the many side of the
relationship
Many-to-Many
PLAYER STATISTICS
Team id(1), Team id(2), Date,
Player Id Points
Each player participates in
many games and each game
has many players.
PLAYER and GAME
Create a third entity/table and
place the primary keys from
each of the original entities
together in the third table as a
combination primary key
DATABASE ASSOCIATIONS …
ER – Diagram : Basket Ball Game
HOME
STADIUM TEAM
GAME
STATISTICS
PLAYER
GAME
Has
Partici
-pates Has
Has
Has
ERD Development Process
 Identify the entities
 Determine the attributes for each entity
 Select the primary key for each entity
 Establish the relationships between the
entities
 Draw an entity model
 Test the relationships and the keys
THANKS
THANKS
THANKS
THANKS
THANKS

More Related Content

Viewers also liked

Er diagram practical examples
Er diagram practical examplesEr diagram practical examples
Er diagram practical examples
Rahul Khanwani
 
Data base management system
Data base management systemData base management system
Data base management system
Navneet Jingar
 
How to Draw an Effective ER diagram
How to Draw an Effective ER diagramHow to Draw an Effective ER diagram
How to Draw an Effective ER diagram
Tech_MX
 
Types of databases
Types of databasesTypes of databases
Types of databases
PAQUIAAIZEL
 
Entity relationship diagram (erd)
Entity relationship diagram (erd)Entity relationship diagram (erd)
Entity relationship diagram (erd)
tameemyousaf
 
Data base bha report example
Data base bha report exampleData base bha report example
Data base bha report example
Mark Hubbard
 

Viewers also liked (20)

Entity Relationship Diagram Templates by Creately
Entity Relationship Diagram Templates by CreatelyEntity Relationship Diagram Templates by Creately
Entity Relationship Diagram Templates by Creately
 
Er diagram practical examples
Er diagram practical examplesEr diagram practical examples
Er diagram practical examples
 
Erd practice exercises
Erd practice exercisesErd practice exercises
Erd practice exercises
 
Data base management system
Data base management systemData base management system
Data base management system
 
Database - Entity Relationship Diagram (ERD)
Database - Entity Relationship Diagram (ERD)Database - Entity Relationship Diagram (ERD)
Database - Entity Relationship Diagram (ERD)
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
 
How to Draw an Effective ER diagram
How to Draw an Effective ER diagramHow to Draw an Effective ER diagram
How to Draw an Effective ER diagram
 
Types of databases
Types of databasesTypes of databases
Types of databases
 
Data Base Management System
Data Base Management SystemData Base Management System
Data Base Management System
 
Library Management System PPT
Library Management System PPTLibrary Management System PPT
Library Management System PPT
 
Software requirements specification of Library Management System
Software requirements specification of Library Management SystemSoftware requirements specification of Library Management System
Software requirements specification of Library Management System
 
Hospital Management System
Hospital Management SystemHospital Management System
Hospital Management System
 
Dbms slides
Dbms slidesDbms slides
Dbms slides
 
Entity relationship diagram (erd)
Entity relationship diagram (erd)Entity relationship diagram (erd)
Entity relationship diagram (erd)
 
Data base bha report example
Data base bha report exampleData base bha report example
Data base bha report example
 
Analysis of Various Attributes to Have a Secure Database
Analysis of Various Attributes to Have a Secure DatabaseAnalysis of Various Attributes to Have a Secure Database
Analysis of Various Attributes to Have a Secure Database
 
Data Models In Database Management System
Data Models In Database Management SystemData Models In Database Management System
Data Models In Database Management System
 
Chap2 practice key
Chap2 practice keyChap2 practice key
Chap2 practice key
 
Data base management system (dbms)
Data base management system (dbms)Data base management system (dbms)
Data base management system (dbms)
 
Intro to DBMS
Intro to DBMSIntro to DBMS
Intro to DBMS
 

Recently uploaded

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Recently uploaded (20)

Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 

data base management system

  • 1. Database Management Entity – Relationship (ER) Diagram Prof. Sridhar Vaithianathan
  • 2. DATA MODELING A Data Model is a map or diagram that represents entities and their relationships.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7. Some Definitions  A File/Entity/Table: A group or collection of similar records  A record / Tuple: one piece of data, i.e., one student's information, a recipe, a test question.  Records = rows  A field/Attributes: one category of information, i.e., Name, Address, Semester Grade, Academic topic  (Fields = columns)
  • 8. ER Diagram - Example
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 17. Entity Relationship Diagram - Notation Entitiy Relationship Associated Object Mandatory (Exactly) One Optional (Zero or one) One Mandatory Many Optional Many Optional Mandatory
  • 18. E – R Diagram Example Basket Ball Game Entities: Home Stadium Team Player Games
  • 19. ER – Diagram Example – Basket Ball Game HOME STADIUM TEAM PLAYER Has Has GAME Participates Has
  • 20. Entities, Attributes and Relationship  Strong Entity Vs Weak entity ( EMPLOYEE & DEPENDENT)  Simple Vs Composite Attributes  Single Valued Vs Multi Valued Attributes  Stored Vs Derived Attributes  Identifier Attribute – Primary Key  Composite Identifier  Foreign Key  Sub-Type Vs Super Type Relationship
  • 21. Database Associations Example HOME STADIUM Stadium Id Stadium Name, Capacity, Location TEAM Team Id Team Name PLAYER Player Id Player Name, Position GAME Team id(1) Team id(2) Date Final Score B A S K E T B A L L G A M E
  • 22. Relationship Example Instructions One-to-One. TEAM Team Id Team Name, Stadium Id Each team has only one home stadium, and each home stadium has only one team. STADIUM and TEAM Place the primary key from one entity to other entity as a foreign key and vice versa. (i.e. foreign key can be placed at either side of the relationship.) One-to-Many PLAYER Player Id Player Name, Position, Team Id Each player is on only one team, but each team has many players. PLAYER and TEAM Place the primary key from the entity on the one side of the relationship as a foreign key in the table for the entity on the many side of the relationship Many-to-Many PLAYER STATISTICS Team id(1), Team id(2), Date, Player Id Points Each player participates in many games and each game has many players. PLAYER and GAME Create a third entity/table and place the primary keys from each of the original entities together in the third table as a combination primary key DATABASE ASSOCIATIONS …
  • 23. ER – Diagram : Basket Ball Game HOME STADIUM TEAM GAME STATISTICS PLAYER GAME Has Partici -pates Has Has Has
  • 24. ERD Development Process  Identify the entities  Determine the attributes for each entity  Select the primary key for each entity  Establish the relationships between the entities  Draw an entity model  Test the relationships and the keys

Editor's Notes

  1. 5