SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Andere mochten auch

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
 

Andere mochten auch (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
 

Kürzlich hochgeladen

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 

Kürzlich hochgeladen (20)

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
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
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
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
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 

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

Hinweis der Redaktion

  1. 5