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

Entity Relationship Diagram Templates by Creately
Entity Relationship Diagram Templates by CreatelyEntity Relationship Diagram Templates by Creately
Entity Relationship Diagram Templates by CreatelyCreately
 
Er diagram practical examples
Er diagram practical examplesEr diagram practical examples
Er diagram practical examplesRahul Khanwani
 
Data base management system
Data base management systemData base management system
Data base management systemNavneet Jingar
 
Database - Entity Relationship Diagram (ERD)
Database - Entity Relationship Diagram (ERD)Database - Entity Relationship Diagram (ERD)
Database - Entity Relationship Diagram (ERD)Mudasir Qazi
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship DiagramShakila Mahjabin
 
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 diagramTech_MX
 
Types of databases
Types of databasesTypes of databases
Types of databasesPAQUIAAIZEL
 
Library Management System PPT
Library Management System PPTLibrary Management System PPT
Library Management System PPTTamaghna Banerjee
 
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 SystemSoumili Sen
 
Hospital Management System
Hospital Management SystemHospital Management System
Hospital Management SystemPranil Dukare
 
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 exampleMark Hubbard
 
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 DatabaseIOSR Journals
 
Data Models In Database Management System
Data Models In Database Management SystemData Models In Database Management System
Data Models In Database Management SystemAmad Ahmad
 
Chap2 practice key
Chap2 practice keyChap2 practice key
Chap2 practice keyIIUM
 
Data base management system (dbms)
Data base management system (dbms)Data base management system (dbms)
Data base management system (dbms)Larry Jones
 

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

Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxUnboundStockton
 

Kürzlich hochgeladen (20)

Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docx
 

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