SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

En vedette

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
 

En vedette (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
 

Dernier

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 17Celine George
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
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 ClassesCeline George
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
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
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
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 ConsultingTechSoup
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Shubhangi Sonawane
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 
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...Poonam Aher Patil
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
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
 

Dernier (20)

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
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
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
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
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
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
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
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
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...
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
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
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
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
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 

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

Notes de l'éditeur

  1. 5