SlideShare una empresa de Scribd logo
1 de 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

Más contenido relacionado

Destacado

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
 

Destacado (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
 

Último

microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
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.pdfPoh-Sun Goh
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
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-701bronxfugly43
 
Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxAmita Gupta
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
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)Jisc
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
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.pdfNirmal Dwivedi
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
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.docxRamakrishna Reddy Bijjam
 
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...pradhanghanshyam7136
 

Último (20)

Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
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
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
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
 
Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
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)
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
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
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
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
 
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...
 

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

Notas del editor

  1. 5