SlideShare a Scribd company logo
Entity Relationship Diagrams
An entity-relationship diagram (ERD) is a graphical representation of a
database that shows the relationship between the entities in the database.
ERD Example 1
A company wants to build a database of their suppliers / parts. Below is an
example of one of the records they currently store:
Design an entity relationship diagram for the database.
ERD Example 1
Step 1 – State the entities:
Supplier
Sales Rep
Part
ERD Example 1
Step 2 – Link the entities
Sales RepSales Rep SupplierSupplier
employed by
PartPart
supplies
ERD Example 1
Step 3 – Complete the relationships
Sales RepSales Rep SupplierSupplier
employed by
PartPart
supplies
ERD Example 1
Step 4 – State any assumptions
Sales RepSales Rep SupplierSupplier
employed by
PartPart
supplies
Assumptions:
1.Only 1 sales rep per company
2.Only 1 supplier for each part
ERD Example 2
W Hansen & Partners are a collective of doctor's surgeries around the UK.
They want to design and build a database to help manage their business.
Below are some details:
1.W Hansen have 7 branches in total, and each branch employs between 3 and
14 GPs
2.GPs can only work at one surgery
3.Patients can only be registered at one surgery
4.Patients can have multiple appointments
5.For each appointment, the surgery stores the date, time, duration and any
notes
Produce an Entity Relationship Diagram for W Hansen & Partners
ERD Example 2
Step 1 – State the entities:
Branch
GP
Patient
Appointment
ERD Example 2
Step 3 – Link the entities
BranchBranch GPGP
employs
AppointmentAppointment
attends
PatientPatient
attends
ERD Example 2
Step 3 – Complete the relationships
BranchBranch GPGP
employs
AppointmentAppointment
attends
PatientPatient
attends
ERD Example 2
Step 4 – State any assumptions
BranchBranch GPGP
employs
AppointmentAppointment
attends
PatientPatient
attends
Assumptions:
1.There will only be one GP at any appointment
2.Only one patient can attend each appointment
Alternative ERD Layout
InsectInsect HabitatHabitatlives in
Insect Name
M 1
Latin Name Size
Habitat Name
Country Description
Type

More Related Content

Viewers also liked

Scripting Languages
Scripting LanguagesScripting Languages
Scripting Languages
Forrester High School
 
JavaScript
JavaScriptJavaScript
Data Dictionary
Data DictionaryData Dictionary
Data Dictionary
Forrester High School
 
ISDD Sequential & Random Access
ISDD Sequential & Random AccessISDD Sequential & Random Access
ISDD Sequential & Random Access
Forrester High School
 
ISDD Cloud and Internet Services
ISDD Cloud and Internet ServicesISDD Cloud and Internet Services
ISDD Cloud and Internet Services
Forrester High School
 
Sound & Video File Sizes
Sound & Video File SizesSound & Video File Sizes
Sound & Video File Sizes
Forrester High School
 
Database - reports, forms, calculations
Database - reports, forms, calculationsDatabase - reports, forms, calculations
Database - reports, forms, calculations
Forrester High School
 
Entities and attributes
Entities and attributesEntities and attributes
Entities and attributes
Forrester High School
 
ISDD Hacking and Viruses
ISDD Hacking and VirusesISDD Hacking and Viruses
ISDD Hacking and Viruses
Forrester High School
 
Web Pages
Web PagesWeb Pages
ISDD Environmental Impact
ISDD Environmental ImpactISDD Environmental Impact
ISDD Environmental Impact
Forrester High School
 
ISDD Standard File Formats
ISDD Standard File FormatsISDD Standard File Formats
ISDD Standard File Formats
Forrester High School
 
Higher Computing Science CSS
Higher Computing Science CSSHigher Computing Science CSS
Higher Computing Science CSS
Forrester High School
 
Audio Compression
Audio CompressionAudio Compression
Audio Compression
Forrester High School
 
Social Impacts of Computing Science
Social Impacts of Computing ScienceSocial Impacts of Computing Science
Social Impacts of Computing Science
missstevenson01
 
Technical Implementation: Software
Technical Implementation: SoftwareTechnical Implementation: Software
Technical Implementation: Software
Forrester High School
 
Searching and Sorting
Searching and SortingSearching and Sorting
Searching and Sorting
Forrester High School
 
ISDD Media Types - File Compression
ISDD Media Types - File CompressionISDD Media Types - File Compression
ISDD Media Types - File Compression
Forrester High School
 
ISDD Back Up Strategies
ISDD Back Up StrategiesISDD Back Up Strategies
ISDD Back Up Strategies
Forrester High School
 
ISDD - Security Risks
ISDD - Security RisksISDD - Security Risks
ISDD - Security Risks
Forrester High School
 

Viewers also liked (20)

Scripting Languages
Scripting LanguagesScripting Languages
Scripting Languages
 
JavaScript
JavaScriptJavaScript
JavaScript
 
Data Dictionary
Data DictionaryData Dictionary
Data Dictionary
 
ISDD Sequential & Random Access
ISDD Sequential & Random AccessISDD Sequential & Random Access
ISDD Sequential & Random Access
 
ISDD Cloud and Internet Services
ISDD Cloud and Internet ServicesISDD Cloud and Internet Services
ISDD Cloud and Internet Services
 
Sound & Video File Sizes
Sound & Video File SizesSound & Video File Sizes
Sound & Video File Sizes
 
Database - reports, forms, calculations
Database - reports, forms, calculationsDatabase - reports, forms, calculations
Database - reports, forms, calculations
 
Entities and attributes
Entities and attributesEntities and attributes
Entities and attributes
 
ISDD Hacking and Viruses
ISDD Hacking and VirusesISDD Hacking and Viruses
ISDD Hacking and Viruses
 
Web Pages
Web PagesWeb Pages
Web Pages
 
ISDD Environmental Impact
ISDD Environmental ImpactISDD Environmental Impact
ISDD Environmental Impact
 
ISDD Standard File Formats
ISDD Standard File FormatsISDD Standard File Formats
ISDD Standard File Formats
 
Higher Computing Science CSS
Higher Computing Science CSSHigher Computing Science CSS
Higher Computing Science CSS
 
Audio Compression
Audio CompressionAudio Compression
Audio Compression
 
Social Impacts of Computing Science
Social Impacts of Computing ScienceSocial Impacts of Computing Science
Social Impacts of Computing Science
 
Technical Implementation: Software
Technical Implementation: SoftwareTechnical Implementation: Software
Technical Implementation: Software
 
Searching and Sorting
Searching and SortingSearching and Sorting
Searching and Sorting
 
ISDD Media Types - File Compression
ISDD Media Types - File CompressionISDD Media Types - File Compression
ISDD Media Types - File Compression
 
ISDD Back Up Strategies
ISDD Back Up StrategiesISDD Back Up Strategies
ISDD Back Up Strategies
 
ISDD - Security Risks
ISDD - Security RisksISDD - Security Risks
ISDD - Security Risks
 

More from Forrester High School

Program Design
Program DesignProgram Design
Program Design
Forrester High School
 
Database Evaluation
Database EvaluationDatabase Evaluation
Database Evaluation
Forrester High School
 
Testing SQL
Testing SQLTesting SQL
SQL
SQLSQL
Database Query Design
Database Query DesignDatabase Query Design
Database Query Design
Forrester High School
 
Data Dictionary
Data DictionaryData Dictionary
Data Dictionary
Forrester High School
 
Compound Keys
Compound KeysCompound Keys
Compound Keys
Forrester High School
 
Entity Occurrence Diagrams
Entity Occurrence DiagramsEntity Occurrence Diagrams
Entity Occurrence Diagrams
Forrester High School
 
Entity Relationship Diagrams
Entity Relationship DiagramsEntity Relationship Diagrams
Entity Relationship Diagrams
Forrester High School
 
Database Analysis
Database AnalysisDatabase Analysis
Database Analysis
Forrester High School
 
Software Evaluation
Software EvaluationSoftware Evaluation
Software Evaluation
Forrester High School
 
Software Testing
Software TestingSoftware Testing
Software Testing
Forrester High School
 
Standard Algorithms
Standard AlgorithmsStandard Algorithms
Standard Algorithms
Forrester High School
 
File Handling
File HandlingFile Handling
File Handling
Forrester High School
 
Python Predefined Functions
Python Predefined FunctionsPython Predefined Functions
Python Predefined Functions
Forrester High School
 
Python Substrings
Python SubstringsPython Substrings
Python Substrings
Forrester High School
 
Variable Scope
Variable ScopeVariable Scope
Variable Scope
Forrester High School
 
Sub-programs
Sub-programsSub-programs
Sub-programs
Forrester High School
 
Records in Python
Records in PythonRecords in Python
Records in Python
Forrester High School
 
Parallel arrays in python
Parallel arrays in pythonParallel arrays in python
Parallel arrays in python
Forrester High School
 

More from Forrester High School (20)

Program Design
Program DesignProgram Design
Program Design
 
Database Evaluation
Database EvaluationDatabase Evaluation
Database Evaluation
 
Testing SQL
Testing SQLTesting SQL
Testing SQL
 
SQL
SQLSQL
SQL
 
Database Query Design
Database Query DesignDatabase Query Design
Database Query Design
 
Data Dictionary
Data DictionaryData Dictionary
Data Dictionary
 
Compound Keys
Compound KeysCompound Keys
Compound Keys
 
Entity Occurrence Diagrams
Entity Occurrence DiagramsEntity Occurrence Diagrams
Entity Occurrence Diagrams
 
Entity Relationship Diagrams
Entity Relationship DiagramsEntity Relationship Diagrams
Entity Relationship Diagrams
 
Database Analysis
Database AnalysisDatabase Analysis
Database Analysis
 
Software Evaluation
Software EvaluationSoftware Evaluation
Software Evaluation
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
Standard Algorithms
Standard AlgorithmsStandard Algorithms
Standard Algorithms
 
File Handling
File HandlingFile Handling
File Handling
 
Python Predefined Functions
Python Predefined FunctionsPython Predefined Functions
Python Predefined Functions
 
Python Substrings
Python SubstringsPython Substrings
Python Substrings
 
Variable Scope
Variable ScopeVariable Scope
Variable Scope
 
Sub-programs
Sub-programsSub-programs
Sub-programs
 
Records in Python
Records in PythonRecords in Python
Records in Python
 
Parallel arrays in python
Parallel arrays in pythonParallel arrays in python
Parallel arrays in python
 

Recently uploaded

Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
Kartik Tiwari
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
Mohammed Sikander
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
deeptiverma2406
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
gb193092
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 

Recently uploaded (20)

Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 

Entity Relationship Diagrams

  • 1.
  • 2. Entity Relationship Diagrams An entity-relationship diagram (ERD) is a graphical representation of a database that shows the relationship between the entities in the database.
  • 3. ERD Example 1 A company wants to build a database of their suppliers / parts. Below is an example of one of the records they currently store: Design an entity relationship diagram for the database.
  • 4. ERD Example 1 Step 1 – State the entities: Supplier Sales Rep Part
  • 5. ERD Example 1 Step 2 – Link the entities Sales RepSales Rep SupplierSupplier employed by PartPart supplies
  • 6. ERD Example 1 Step 3 – Complete the relationships Sales RepSales Rep SupplierSupplier employed by PartPart supplies
  • 7. ERD Example 1 Step 4 – State any assumptions Sales RepSales Rep SupplierSupplier employed by PartPart supplies Assumptions: 1.Only 1 sales rep per company 2.Only 1 supplier for each part
  • 8. ERD Example 2 W Hansen & Partners are a collective of doctor's surgeries around the UK. They want to design and build a database to help manage their business. Below are some details: 1.W Hansen have 7 branches in total, and each branch employs between 3 and 14 GPs 2.GPs can only work at one surgery 3.Patients can only be registered at one surgery 4.Patients can have multiple appointments 5.For each appointment, the surgery stores the date, time, duration and any notes Produce an Entity Relationship Diagram for W Hansen & Partners
  • 9. ERD Example 2 Step 1 – State the entities: Branch GP Patient Appointment
  • 10. ERD Example 2 Step 3 – Link the entities BranchBranch GPGP employs AppointmentAppointment attends PatientPatient attends
  • 11. ERD Example 2 Step 3 – Complete the relationships BranchBranch GPGP employs AppointmentAppointment attends PatientPatient attends
  • 12. ERD Example 2 Step 4 – State any assumptions BranchBranch GPGP employs AppointmentAppointment attends PatientPatient attends Assumptions: 1.There will only be one GP at any appointment 2.Only one patient can attend each appointment
  • 13. Alternative ERD Layout InsectInsect HabitatHabitatlives in Insect Name M 1 Latin Name Size Habitat Name Country Description Type