SlideShare uma empresa Scribd logo
1 de 39
Entity Relationship Diagram
(ERD)
Objectives
• Define terms related to entity relationship
modeling, including entity, entity instance,
attribute, relationship and cardinality, and
primary key.
• Describe the entity modeling process.
• Discuss how to draw an entity relationship
diagram.
• Describe how to recognize entities,
attributes, relationships, and cardinalities.
Database Model
A database can be modeled as:
– a collection of entities,
– relationship among entities.
Database systems are often modeled using
an Entity Relationship (ER) diagram as the
"blueprint" from which the actual data is
stored — the output of the design phase.
Entity Relationship Diagram (ERD)
• ER model allows us to sketch database designs
• ERD is a graphical tool for modeling data.
• ERD is widely used in database design
• ERD is a graphical representation of the logical
structure of a database
• ERD is a model that identifies the concepts or
entities that exist in a system and the
relationships between those entities
Purposes of ERD
An ERD serves several purposes
• The database analyst/designer gains a
better understanding of the information to
be contained in the database through the
process of constructing the ERD.
• The ERD serves as a documentation tool.
• Finally, the ERD is used to communicate
the logical structure of the database to
users. In particular, the ERD effectively
communicates the logic of the database to
users.
Components of an ERD
An ERD typically consists of four different
graphical components:
1. Entity
2. Relationship
3. Cardinality
4. Attribute
Classification of Relationship
• Optional Relationship
– An Employee may or may not be assigned
to a Department
– A Patient may or may not be assigned to a
Bed
• Mandatory Relationship
– Every Course must be taught by at least
one Teacher
– Every mother have at least a Child
Cardinality Constraints
• Express the number of entities to which another
entity can be associated via a relationship set.
• Cardinality Constraints - the number of instances
of one entity that can or must be associated with
each instance of another entity.
• Minimum Cardinality
– If zero, then optional
– If one or more, then mandatory
• Maximum Cardinality
– The maximum number
Cardinality Constraints (Contd.)
• For a binary relationship set the mapping
cardinality must be one of the following types:
–One to one
• A Manager Head one Department and vice versa
–One to many ( or many to one)
• An Employee Works in one Department or One
Department has many Employees
–Many to many
• A Teacher Teaches many Students and A
student is taught by many Teachers
Cardinality Constraints (Contd.)
Cardinality Constraints Example
• In our model, we wish to indicate that each
school may enroll many students, or may not
enroll any students at all.
• We also wish to indicate that each student
attends exactly one school. The following
diagram indicates this optionality and
cardinality:
Cardinality Constraints Example (Contd.)
SCHOOL
STUDENT
Each school enrolls
at least zero
and at most many
students
Each student attends
at least one
and at most one
school
General Steps to create an ERD
• Identify the entity
• Identify the entity's attributes
• Identify the Primary Keys
• Identify the relation between entities
• Identify the Cardinality constraint
• Draw the ERD
• Check the ERD
Steps in building an ERD
Developing an ERD
The process has ten steps:
1. Identify Entities
2. Find Relationships
3. Draw Rough ERD
4. Fill in Cardinality
5. Define Primary Keys
6. Draw Key-Based ERD
7. Identify Attributes
8. Map Attributes
9. Draw fully attributed ERD
10. Check Results
A Simple Example
A company has several departments. Each
department has a supervisor and at least one
employee. Employees must be assigned to at
least one, but possibly more departments. At
least one employee is assigned to a project,
but an employee may be on vacation and not
assigned to any projects. The important data
fields are the names of the departments,
projects, supervisors and employees, as well
as the supervisor and employee number and
a unique project number.
Identify entities
• One approach to this is to work through the
information and highlight those words which you think
correspond to entities.
• A company has several departments. Each
department has a supervisor and at least one
employee. Employees must be assigned to at least
one, but possibly more departments. At least one
employee is assigned to a project, but an employee
may be on vacation and not assigned to any projects.
The important data fields are the names of the
departments, projects, supervisors and employees, as
well as the supervisor and employee number and a
unique project number.
• A true entity should have more than one instance
Find Relationships
• Aim is to identify the associations, the
connections between pairs of entities.
• A simple approach to do this is using a
relationship matrix (table) that has rows and
columns for each of the identified entities.
Find Relationships (Contd.)
• Go through each cell and decide whether or not
there is an association. For example, the first cell
on the second row is used to indicate if there is a
relationship between the entity "Employee" and
the entity "Department".
Identified Relationships
Names placed in the cells are meant to
capture/describe the relationships. So you
can use them like this
• A Department is assigned an employee
• A Department is run by a supervisor
• An employee belongs to a department
• An employee works on a project
• A supervisor runs a department
• A project uses an employee
Draw Rough ERD
Draw a diagram and:
• Place all the entities in rectangles
• Use diamonds and lines to represent the
relationships between entities.
• General Examples
Drawing Rough ERD (Contd.)
Drawing Rough ERD (Contd.)
Drawing Rough ERD (Contd.)
Fill in Cardinality
• Supervisor
– Each department has one supervisor.
• Department
– Each supervisor has one department.
– Each employee can belong to one or more departments
• Employee
– Each department must have one or more employees
– Each project must have one or more employees
• Project
– Each employee can have 0 or more projects.
Fill in Cardinality (Contd.)
The cardinality of a relationship can only
have the following values
–One and only one
–One or more
–Zero or more
–Zero or one
Cardinality Notation
Cardinality Examples
A
A
A
A
B
B
B
B
Each instance of A is related to a minimum of
zero and a maximum of one instance of B
Each instance of B is related to a minimum of
one and a maximum of one instance of A
Each instance of A is related to a minimum of
one and a maximum of many instances of B
Each instance of B is related to a minimum of
zero and a maximum of many instances of A
ERD with cardinality
Examples
ERD for Course Enrollment
ERD for Course Registration
Rough ERD Plus Primary Keys
Identify Attributes
• In this step we try to identify and name all the attributes
essential to the system we are studying without trying to
match them to particular entities.
• The best way to do this is to study the forms, files and reports
currently kept by the users of the system and circle each data
item on the paper copy.
• Cross out those which will not be transferred to the new
system, extraneous items such as signatures, and constant
information which is the same for all instances of the form
(e.g. your company name and address). The remaining
circled items should represent the attributes you need. You
should always verify these with your system users.
(Sometimes forms or reports are out of date.)
• The only attributes indicated are the names of the
departments, projects, supervisors and employees, as well
as the supervisor and employee NUMBER and a unique
project number.
Map Attributes
• For each attribute we need to match it with exactly
one entity. Often it seems like an attribute should
go with more than one entity (e.g. Name). In this
case you need to add a modifier to the attribute
name to make it unique (e.g. Customer Name,
Employee Name, etc.) or determine which entity an
attribute "best' describes.
• If you have attributes left over without
corresponding entities, you may have missed an
entity and its corresponding relationships. Identify
these missed entities and add them to the
relationship matrix now.
Map Attributes (Contd.)
Draw Fully Attributed ERD
Check ERD Results
• Look at your diagram from the point of view of
a system owner or user. Is everything clear?
• Check through the Cardinality pairs.
• Also, look over the list of attributes associated
with each entity to see if anything has been
omitted.
Questions
• Feel Free to ask any Questions
?

Mais conteúdo relacionado

Mais procurados

1. Introduction to DBMS
1. Introduction to DBMS1. Introduction to DBMS
1. Introduction to DBMSkoolkampus
 
Lecture 01 introduction to database
Lecture 01 introduction to databaseLecture 01 introduction to database
Lecture 01 introduction to databaseemailharmeet
 
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
FUNCTION DEPENDENCY  AND TYPES & EXAMPLEFUNCTION DEPENDENCY  AND TYPES & EXAMPLE
FUNCTION DEPENDENCY AND TYPES & EXAMPLEVraj Patel
 
Presentation on Database management system
Presentation on Database management systemPresentation on Database management system
Presentation on Database management systemPrerana Bhattarai
 
All data models in dbms
All data models in dbmsAll data models in dbms
All data models in dbmsNaresh Kumar
 
Fundamentals of Database ppt ch01
Fundamentals of Database ppt ch01Fundamentals of Database ppt ch01
Fundamentals of Database ppt ch01Jotham Gadot
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship ModelSlideshare
 
Introduction to Database
Introduction to DatabaseIntroduction to Database
Introduction to DatabaseSiti Ismail
 
SWE-401 - 7. Software Design Strategies
SWE-401 - 7. Software Design StrategiesSWE-401 - 7. Software Design Strategies
SWE-401 - 7. Software Design Strategiesghayour abbas
 
Database systems - Chapter 1
Database systems - Chapter 1Database systems - Chapter 1
Database systems - Chapter 1shahab3
 
Basic Concept of Database
Basic Concept of DatabaseBasic Concept of Database
Basic Concept of DatabaseMarlon Jamera
 
Database systems
Database systemsDatabase systems
Database systemsDhani Ahmad
 

Mais procurados (20)

1. Introduction to DBMS
1. Introduction to DBMS1. Introduction to DBMS
1. Introduction to DBMS
 
Rdbms
RdbmsRdbms
Rdbms
 
Lecture 01 introduction to database
Lecture 01 introduction to databaseLecture 01 introduction to database
Lecture 01 introduction to database
 
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
FUNCTION DEPENDENCY  AND TYPES & EXAMPLEFUNCTION DEPENDENCY  AND TYPES & EXAMPLE
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
 
Presentation on Database management system
Presentation on Database management systemPresentation on Database management system
Presentation on Database management system
 
Normalization in Database
Normalization in DatabaseNormalization in Database
Normalization in Database
 
Data dictionary
Data dictionaryData dictionary
Data dictionary
 
All data models in dbms
All data models in dbmsAll data models in dbms
All data models in dbms
 
Data Dictionary
Data DictionaryData Dictionary
Data Dictionary
 
ER-Model-ER Diagram
ER-Model-ER DiagramER-Model-ER Diagram
ER-Model-ER Diagram
 
Fundamentals of Database ppt ch01
Fundamentals of Database ppt ch01Fundamentals of Database ppt ch01
Fundamentals of Database ppt ch01
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship Model
 
RDBMS
RDBMSRDBMS
RDBMS
 
Relational model
Relational modelRelational model
Relational model
 
Introduction to Database
Introduction to DatabaseIntroduction to Database
Introduction to Database
 
SWE-401 - 7. Software Design Strategies
SWE-401 - 7. Software Design StrategiesSWE-401 - 7. Software Design Strategies
SWE-401 - 7. Software Design Strategies
 
Database systems - Chapter 1
Database systems - Chapter 1Database systems - Chapter 1
Database systems - Chapter 1
 
Basic Concept of Database
Basic Concept of DatabaseBasic Concept of Database
Basic Concept of Database
 
Database systems
Database systemsDatabase systems
Database systems
 
Dbms architecture
Dbms architectureDbms architecture
Dbms architecture
 

Destaque

Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship DiagramShakila Mahjabin
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship DiagramRakhi Mukherji
 
Database - Entity Relationship Diagram (ERD)
Database - Entity Relationship Diagram (ERD)Database - Entity Relationship Diagram (ERD)
Database - Entity Relationship Diagram (ERD)Mudasir Qazi
 
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
 
Entity-Relationship Diagrams ERD
Entity-Relationship Diagrams ERDEntity-Relationship Diagrams ERD
Entity-Relationship Diagrams ERDtorp42
 
Entity relationship diagram (erd)
Entity relationship diagram (erd)Entity relationship diagram (erd)
Entity relationship diagram (erd)tameemyousaf
 
Entity Relationship Diagram presentation
Entity Relationship Diagram presentationEntity Relationship Diagram presentation
Entity Relationship Diagram presentationSopov Chan
 
Business Intelligence - Intro
Business Intelligence - IntroBusiness Intelligence - Intro
Business Intelligence - IntroDavid Hubbard
 
Introduction to Graph Databases
Introduction to Graph DatabasesIntroduction to Graph Databases
Introduction to Graph DatabasesMax De Marzi
 
Database : Relational Data Model
Database : Relational Data ModelDatabase : Relational Data Model
Database : Relational Data ModelSmriti Jain
 
Database management system
Database management systemDatabase management system
Database management systemRizwanHafeez
 
Business Intelligence Presentation (1/2)
Business Intelligence Presentation (1/2)Business Intelligence Presentation (1/2)
Business Intelligence Presentation (1/2)Bernardo Najlis
 
Introduction to Business Intelligence
Introduction to Business IntelligenceIntroduction to Business Intelligence
Introduction to Business IntelligenceAlmog Ramrajkar
 
Business intelligence ppt
Business intelligence pptBusiness intelligence ppt
Business intelligence pptsujithkylm007
 

Destaque (20)

Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
 
Database - Entity Relationship Diagram (ERD)
Database - Entity Relationship Diagram (ERD)Database - Entity Relationship Diagram (ERD)
Database - Entity Relationship Diagram (ERD)
 
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
 
Dhcp
DhcpDhcp
Dhcp
 
Entity-Relationship Diagrams ERD
Entity-Relationship Diagrams ERDEntity-Relationship Diagrams ERD
Entity-Relationship Diagrams ERD
 
E R Diagram
E R DiagramE R Diagram
E R Diagram
 
ER MODEL
ER MODELER MODEL
ER MODEL
 
Entity relationship diagram (erd)
Entity relationship diagram (erd)Entity relationship diagram (erd)
Entity relationship diagram (erd)
 
Files Vs DataBase
Files Vs DataBaseFiles Vs DataBase
Files Vs DataBase
 
Entity Relationship Diagram presentation
Entity Relationship Diagram presentationEntity Relationship Diagram presentation
Entity Relationship Diagram presentation
 
Business intelligence
Business intelligenceBusiness intelligence
Business intelligence
 
Business Intelligence - Intro
Business Intelligence - IntroBusiness Intelligence - Intro
Business Intelligence - Intro
 
Introduction to Graph Databases
Introduction to Graph DatabasesIntroduction to Graph Databases
Introduction to Graph Databases
 
Database : Relational Data Model
Database : Relational Data ModelDatabase : Relational Data Model
Database : Relational Data Model
 
Database management system
Database management systemDatabase management system
Database management system
 
Introduction to database
Introduction to databaseIntroduction to database
Introduction to database
 
Business Intelligence Presentation (1/2)
Business Intelligence Presentation (1/2)Business Intelligence Presentation (1/2)
Business Intelligence Presentation (1/2)
 
Introduction to Business Intelligence
Introduction to Business IntelligenceIntroduction to Business Intelligence
Introduction to Business Intelligence
 
Business intelligence ppt
Business intelligence pptBusiness intelligence ppt
Business intelligence ppt
 

Semelhante a Create ERD Diagram Guide

WBC Entity Relationship and data flow diagrams
WBC Entity Relationship and data flow diagramsWBC Entity Relationship and data flow diagrams
WBC Entity Relationship and data flow diagramsArshitSood3
 
Cn presentation on the topic called as re modelling
Cn presentation on the topic called as re modellingCn presentation on the topic called as re modelling
Cn presentation on the topic called as re modellingg30162363
 
Introduction to Database Management Systems
Introduction to Database Management Systems Introduction to Database Management Systems
Introduction to Database Management Systems Reem Sherif
 
Entityrelationshipmodel
EntityrelationshipmodelEntityrelationshipmodel
EntityrelationshipmodelEnes Bolfidan
 
entityrelationshipmodel.pptx
entityrelationshipmodel.pptxentityrelationshipmodel.pptx
entityrelationshipmodel.pptxThangamaniR3
 
Data and functional modeling
Data and functional modelingData and functional modeling
Data and functional modelingSlideshare
 
Advance database system(part 4)
Advance database system(part 4)Advance database system(part 4)
Advance database system(part 4)Abdullah Khosa
 
IT6701 Information Management Unit-I
IT6701 Information Management Unit-IIT6701 Information Management Unit-I
IT6701 Information Management Unit-IMikel Raj
 
DATA MODEL PRESENTATION UNIT I-BCA I.pptx
DATA MODEL PRESENTATION UNIT I-BCA I.pptxDATA MODEL PRESENTATION UNIT I-BCA I.pptx
DATA MODEL PRESENTATION UNIT I-BCA I.pptxJasmineMichael1
 

Semelhante a Create ERD Diagram Guide (20)

Erd
ErdErd
Erd
 
WBC Entity Relationship and data flow diagrams
WBC Entity Relationship and data flow diagramsWBC Entity Relationship and data flow diagrams
WBC Entity Relationship and data flow diagrams
 
Database design
Database designDatabase design
Database design
 
Cn presentation on the topic called as re modelling
Cn presentation on the topic called as re modellingCn presentation on the topic called as re modelling
Cn presentation on the topic called as re modelling
 
Revision ch 3
Revision ch 3Revision ch 3
Revision ch 3
 
Introduction to Database Management Systems
Introduction to Database Management Systems Introduction to Database Management Systems
Introduction to Database Management Systems
 
Entityrelationshipmodel
EntityrelationshipmodelEntityrelationshipmodel
Entityrelationshipmodel
 
er-models.pptx
er-models.pptxer-models.pptx
er-models.pptx
 
entityrelationshipmodel.pptx
entityrelationshipmodel.pptxentityrelationshipmodel.pptx
entityrelationshipmodel.pptx
 
Lecture7.pptx
Lecture7.pptxLecture7.pptx
Lecture7.pptx
 
Database design
Database designDatabase design
Database design
 
DBMS Class 3
DBMS Class 3DBMS Class 3
DBMS Class 3
 
Database part3-
Database part3-Database part3-
Database part3-
 
lecture2.pdf
lecture2.pdflecture2.pdf
lecture2.pdf
 
Data and functional modeling
Data and functional modelingData and functional modeling
Data and functional modeling
 
Day 1 SQL.pptx
Day 1 SQL.pptxDay 1 SQL.pptx
Day 1 SQL.pptx
 
SQL.pptx
SQL.pptxSQL.pptx
SQL.pptx
 
Advance database system(part 4)
Advance database system(part 4)Advance database system(part 4)
Advance database system(part 4)
 
IT6701 Information Management Unit-I
IT6701 Information Management Unit-IIT6701 Information Management Unit-I
IT6701 Information Management Unit-I
 
DATA MODEL PRESENTATION UNIT I-BCA I.pptx
DATA MODEL PRESENTATION UNIT I-BCA I.pptxDATA MODEL PRESENTATION UNIT I-BCA I.pptx
DATA MODEL PRESENTATION UNIT I-BCA I.pptx
 

Mais de tameemyousaf

Switching Techniques
Switching TechniquesSwitching Techniques
Switching Techniquestameemyousaf
 
Flow & Error Control
Flow & Error ControlFlow & Error Control
Flow & Error Controltameemyousaf
 
03 stacks and_queues_using_arrays
03 stacks and_queues_using_arrays03 stacks and_queues_using_arrays
03 stacks and_queues_using_arraystameemyousaf
 
Workgroup vs domain
Workgroup vs domainWorkgroup vs domain
Workgroup vs domaintameemyousaf
 
Windows server 2003_r2
Windows server 2003_r2Windows server 2003_r2
Windows server 2003_r2tameemyousaf
 
Active directory installation windows 2003 1
Active directory installation windows 2003 1Active directory installation windows 2003 1
Active directory installation windows 2003 1tameemyousaf
 

Mais de tameemyousaf (9)

IP addressing
IP addressingIP addressing
IP addressing
 
Switching Techniques
Switching TechniquesSwitching Techniques
Switching Techniques
 
IP addressing
IP addressingIP addressing
IP addressing
 
Flow & Error Control
Flow & Error ControlFlow & Error Control
Flow & Error Control
 
03 stacks and_queues_using_arrays
03 stacks and_queues_using_arrays03 stacks and_queues_using_arrays
03 stacks and_queues_using_arrays
 
Workgroup vs domain
Workgroup vs domainWorkgroup vs domain
Workgroup vs domain
 
Windows server 2003_r2
Windows server 2003_r2Windows server 2003_r2
Windows server 2003_r2
 
Dhcp
DhcpDhcp
Dhcp
 
Active directory installation windows 2003 1
Active directory installation windows 2003 1Active directory installation windows 2003 1
Active directory installation windows 2003 1
 

Último

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 

Último (20)

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 

Create ERD Diagram Guide

  • 2. Objectives • Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship and cardinality, and primary key. • Describe the entity modeling process. • Discuss how to draw an entity relationship diagram. • Describe how to recognize entities, attributes, relationships, and cardinalities.
  • 3. Database Model A database can be modeled as: – a collection of entities, – relationship among entities. Database systems are often modeled using an Entity Relationship (ER) diagram as the "blueprint" from which the actual data is stored — the output of the design phase.
  • 4. Entity Relationship Diagram (ERD) • ER model allows us to sketch database designs • ERD is a graphical tool for modeling data. • ERD is widely used in database design • ERD is a graphical representation of the logical structure of a database • ERD is a model that identifies the concepts or entities that exist in a system and the relationships between those entities
  • 5. Purposes of ERD An ERD serves several purposes • The database analyst/designer gains a better understanding of the information to be contained in the database through the process of constructing the ERD. • The ERD serves as a documentation tool. • Finally, the ERD is used to communicate the logical structure of the database to users. In particular, the ERD effectively communicates the logic of the database to users.
  • 6. Components of an ERD An ERD typically consists of four different graphical components: 1. Entity 2. Relationship 3. Cardinality 4. Attribute
  • 7. Classification of Relationship • Optional Relationship – An Employee may or may not be assigned to a Department – A Patient may or may not be assigned to a Bed • Mandatory Relationship – Every Course must be taught by at least one Teacher – Every mother have at least a Child
  • 8. Cardinality Constraints • Express the number of entities to which another entity can be associated via a relationship set. • Cardinality Constraints - the number of instances of one entity that can or must be associated with each instance of another entity. • Minimum Cardinality – If zero, then optional – If one or more, then mandatory • Maximum Cardinality – The maximum number
  • 9. Cardinality Constraints (Contd.) • For a binary relationship set the mapping cardinality must be one of the following types: –One to one • A Manager Head one Department and vice versa –One to many ( or many to one) • An Employee Works in one Department or One Department has many Employees –Many to many • A Teacher Teaches many Students and A student is taught by many Teachers
  • 11. Cardinality Constraints Example • In our model, we wish to indicate that each school may enroll many students, or may not enroll any students at all. • We also wish to indicate that each student attends exactly one school. The following diagram indicates this optionality and cardinality:
  • 12. Cardinality Constraints Example (Contd.) SCHOOL STUDENT Each school enrolls at least zero and at most many students Each student attends at least one and at most one school
  • 13. General Steps to create an ERD • Identify the entity • Identify the entity's attributes • Identify the Primary Keys • Identify the relation between entities • Identify the Cardinality constraint • Draw the ERD • Check the ERD
  • 15. Developing an ERD The process has ten steps: 1. Identify Entities 2. Find Relationships 3. Draw Rough ERD 4. Fill in Cardinality 5. Define Primary Keys 6. Draw Key-Based ERD 7. Identify Attributes 8. Map Attributes 9. Draw fully attributed ERD 10. Check Results
  • 16. A Simple Example A company has several departments. Each department has a supervisor and at least one employee. Employees must be assigned to at least one, but possibly more departments. At least one employee is assigned to a project, but an employee may be on vacation and not assigned to any projects. The important data fields are the names of the departments, projects, supervisors and employees, as well as the supervisor and employee number and a unique project number.
  • 17. Identify entities • One approach to this is to work through the information and highlight those words which you think correspond to entities. • A company has several departments. Each department has a supervisor and at least one employee. Employees must be assigned to at least one, but possibly more departments. At least one employee is assigned to a project, but an employee may be on vacation and not assigned to any projects. The important data fields are the names of the departments, projects, supervisors and employees, as well as the supervisor and employee number and a unique project number. • A true entity should have more than one instance
  • 18. Find Relationships • Aim is to identify the associations, the connections between pairs of entities. • A simple approach to do this is using a relationship matrix (table) that has rows and columns for each of the identified entities.
  • 19. Find Relationships (Contd.) • Go through each cell and decide whether or not there is an association. For example, the first cell on the second row is used to indicate if there is a relationship between the entity "Employee" and the entity "Department".
  • 20. Identified Relationships Names placed in the cells are meant to capture/describe the relationships. So you can use them like this • A Department is assigned an employee • A Department is run by a supervisor • An employee belongs to a department • An employee works on a project • A supervisor runs a department • A project uses an employee
  • 21. Draw Rough ERD Draw a diagram and: • Place all the entities in rectangles • Use diamonds and lines to represent the relationships between entities. • General Examples
  • 22. Drawing Rough ERD (Contd.)
  • 23. Drawing Rough ERD (Contd.)
  • 24. Drawing Rough ERD (Contd.)
  • 25. Fill in Cardinality • Supervisor – Each department has one supervisor. • Department – Each supervisor has one department. – Each employee can belong to one or more departments • Employee – Each department must have one or more employees – Each project must have one or more employees • Project – Each employee can have 0 or more projects.
  • 26. Fill in Cardinality (Contd.) The cardinality of a relationship can only have the following values –One and only one –One or more –Zero or more –Zero or one
  • 28. Cardinality Examples A A A A B B B B Each instance of A is related to a minimum of zero and a maximum of one instance of B Each instance of B is related to a minimum of one and a maximum of one instance of A Each instance of A is related to a minimum of one and a maximum of many instances of B Each instance of B is related to a minimum of zero and a maximum of many instances of A
  • 31. ERD for Course Enrollment
  • 32. ERD for Course Registration
  • 33. Rough ERD Plus Primary Keys
  • 34. Identify Attributes • In this step we try to identify and name all the attributes essential to the system we are studying without trying to match them to particular entities. • The best way to do this is to study the forms, files and reports currently kept by the users of the system and circle each data item on the paper copy. • Cross out those which will not be transferred to the new system, extraneous items such as signatures, and constant information which is the same for all instances of the form (e.g. your company name and address). The remaining circled items should represent the attributes you need. You should always verify these with your system users. (Sometimes forms or reports are out of date.) • The only attributes indicated are the names of the departments, projects, supervisors and employees, as well as the supervisor and employee NUMBER and a unique project number.
  • 35. Map Attributes • For each attribute we need to match it with exactly one entity. Often it seems like an attribute should go with more than one entity (e.g. Name). In this case you need to add a modifier to the attribute name to make it unique (e.g. Customer Name, Employee Name, etc.) or determine which entity an attribute "best' describes. • If you have attributes left over without corresponding entities, you may have missed an entity and its corresponding relationships. Identify these missed entities and add them to the relationship matrix now.
  • 38. Check ERD Results • Look at your diagram from the point of view of a system owner or user. Is everything clear? • Check through the Cardinality pairs. • Also, look over the list of attributes associated with each entity to see if anything has been omitted.
  • 39. Questions • Feel Free to ask any Questions ?