1
Entity Relationship Modeling
Objectives:
• To illustrate how relationships between entities are defined and refined.
• To know how relationships are incorporated into the database design
process.
• To describe how ERD components affect database design and
implementation.
2
1.0 What is Conceptual Database Design?
• Process of describing the data, relationships
between the data, relationships between the data,
and the constraints on the data.
• After analysis - Gather all the essential data
required and understand how the data are related
• The focus is on the data, rather than on the
processes.
• The output of the conceptual database design is a
Conceptual Data Model ( + Data Dictionary)
3
2.0 Gathering Information for Conceptual Data
Modeling
• Two perspectives
– Top-down
• Data model is derived from an intimate
understanding of the business.
– Bottom-up
• Data model is derived by reviewing specifications
and business documents.
4
2.0 Entity-Relationship (ER) Modeling.
• ER Modeling is a top-down approach to database
design.
• Entity Relationship (ER) Diagram
– A detailed, logical representation of the entities,
associations and data elements for an organization or
business
• Notation uses three main constructs
– Data entities
– Relationships
– Attributes
Chen Model &
Crow’s Foot
Model
Person, place, object, event
or concept about which data
is to be maintained
named property or
characteristic of an
entity
Association
between the
instances of one or
more entity types
Represents a set or collection of
objects in the real world that
share the same properties
Chen Notation
EntityName Verb Phrase AttributeName
Crow’s Foot Notation
EntityName
Entity Attribute
EntityName
List of
Attributes
Relationship
Verb phrase
Acceptable
7
2.1 Entities
• Examples of entities:
– Person: EMPLOYEE, STUDENT, PATIENT
– Place: STORE, WAREHOUSE
– Object: MACHINE, PRODUCT, CAR
– Event: SALE,REGISTRATION, RENEWAL
– Concept: ACCOUNT, COURSE
• Guidelines for naming and defining entity types:
– An entity type name is a singular noun
– An entity type should be descriptive and specific
– An entity name should be concise
– Event entity types should be named for the result of the event, not
the activity or process of the event.
8
2.2 Attributes
• Example of entity types and associated attributes:
STUDENT: Student_ID, Student_Name, Home_Address,
Phone_Number, Major
• Guidelines for naming attributes:
– An attribute name is a noun.
– An attribute name should be unique
– To make an attribute name unique and clear, each attribute name
should follow a standard format
– Similar attributes of different entity types should use similar but
distinguishing names.
9
2.2.1 Identifier Attributes
• Candidate key
– Attribute (or combination of attributes) that uniquely
identifies each instance of an entity type
– Some entities may have more than one candidate key
• Ex: A candidate key for EMPLOYEE is Employee_ID, a second is
the combination of Employee_Name and Address.
• If there is more than one candidate key, need to make a choice.
• Identifier
– A candidate key that has been selected as the unique
identifying characteristic for an entity type
10
2.2.2 Referential Attributes
Name IdNum DeptID Email
Ali 105 LG ali@a.com
Mary 106 IT mary@a.com
John 107 ENG john@a.com
Lim 108 IT lim@a.com
Instance of Lecturer.
Referential attribute: Ties the lecturer entity to
another entity that is department.
• Make Reference to another instance in another table
11
Example
Staff
StaffID
Name Gender
IC
Staff
StaffID
Name
Gender
IC
PK
12
2.3 Relationships
 Associations between instances of one or more entity types that is of interest
 Given a name that describes its function.
• relationship name is an active or a passive verb.
Author Book
Relationship name:
writes
An author writes one or more books
A book can be written by one or more authors.
13
2.3.1 Degree of Relationships
• Degree: number of entity types that participate in a relationship
• Three cases
– Unary: between two instances of one entity type
– Binary: between the instances of two entity types
– Ternary: among the instances of three entity types
14
2.4 Cardinality and Connectivity
• Relationships can be classified as either
• one – to – one
• one – to – many
• many – to –many
• Cardinality : minimum and maximum number of
instances of Entity B that can (or must be)
associated with each instance of entity A.
Connectivity
15
2.4 Cardinality and Connectivity
Professor Class
teaches
A professor teaches class OR
A class is taught by professor
How Many??
Professor Class
teaches
16
2.4 Cardinality and Connectivity
Professor Class
teaches
Professor Class
teaches
1 M
Connectivity
Connectivity
(1,1)
(1,1)
(1,4)
(1,4)
Cardinality
Cardinality
17
2.4.1 Connectivity
• Chen Model
– 1 to represent one.
– M to represent many
• Crow’s Foot
many
One
One or many
1
M
Mandatory one , means (1,1)
Optional? – we’ll see after this
18
2.5 Binary Relationships
• 1:M relationship
– Relational modeling ideal
– Should be the norm in any relational database design
The 1: M relationship between PAINTER and PAINTING
The Implemented 1:M relationship between PAINTER and PAINTING
20
2.5 Binary Relationships
• 1:1 relationship
– Should be rare in any relational database design
– A single entity instance in one entity class is related to a single entity
instance in another entity class
– Could indicate that two entities actually belong in the same table
The 1:1 Relationship Between PROFESSOR and DEPARTMENT
The Implemented
1:1 Relationship
Between
PROFESSOR
and
DEPARTMENT
23
2.5 Binary Relationships
• M:N relationships
– Must be avoided because they lead to data redundancies.
– Can be implemented by breaking it up to produce a set of 1:M
relationships
– Can avoid problems inherent to M:N relationship by creating a
composite entity or bridge entity
• This will be used to link the tables that were originally related
in a M:N relationship
• The composite entity structure includes-as foreign keys-at
least the primary keys of the tables that are to be linked.
The M:N Relationship Between STUDENT and CLASS
This CANNOT be implemented as shown next…..
Bowser
Smithson
Accounting 1 (ACCT-211)
Intro to Microcomputing (CIS-220)
Intro to Statistics (QM-261)
The tables have many redundancies!!
+ CLASS_CODE
CLASS_CODE
+ STU_NUM
Changing the M:N relationship to TWO 1:M relationships
Converting the M:N relationship into TWO 1:M relationships
Foreign keys reference the primary keys in the
other tables of which it has a relationship with
The database designer has 2 main options to
define a composite table’s primary key:
either
use the combination of those foreign
keys or create a new primary key.
28
2.6 Mandatory vs. Optional Cardinalities
• Specifies whether an instance must exist or can be absent in the
relationship
Lecturer Class
handles
A Lecturer may handle zero or many classes.
A class is handled by one and only one Lecturer.
Optional
Mandatory
(0,N)
(1,1)
Lecturer Class
(0,N) (1,1)
handles
1
M
29
2.7 How to Evaluate a Data Model?
• A good data model has the following:
– Accuracy and completeness
– Non redundancy
– Enforcement of business rules
– Data Reusability
– Stability and Flexibility
– Communication Effectiveness
– Simplicity
30
A Common Mistake
Modeling the business processes or functions
instead of the data.
What data we want to keep??
We are interested in modeling the data,
NOT the processes or functions that use
or generate those data.
31
Example:
Member Books
Searches
M N
Is this part of the data requirement?
Are we interested to know the books searched by the members?
If answer is NO, then DO NOT include that as a relationship.
Use other appropriate diagramming techniques to capture the business
processes such as Data Flow Diagram.
Do not mix up the use of ER Modeling with DFD.

More Related Content

DOC
Design and implementation of a hospital management system
PPTX
Hospital management system
DOC
Hospital management system
PPTX
Cloud Reference Model
PDF
Project Proposal(Hospital Management System)
DOCX
Hospital management system
ODT
PROJECT-HOSPITAL MANAGEMENT SYSTEM CHAP. 1 TO 4
PDF
44478167 hospital-management-system
Design and implementation of a hospital management system
Hospital management system
Hospital management system
Cloud Reference Model
Project Proposal(Hospital Management System)
Hospital management system
PROJECT-HOSPITAL MANAGEMENT SYSTEM CHAP. 1 TO 4
44478167 hospital-management-system

What's hot (20)

PPTX
hospital management System
PPT
Architectural Design in Software Engineering SE10
PPTX
Introduction to Cloud Data Center and Network Issues
PDF
Hospital Management System (2nd Task)
PPTX
Data center
PDF
Hospital Management System Project Report
DOCX
Hospital Management System
PPT
Hospital management final report presentation
PPTX
Data center Technologies
 
PPTX
Hospital presentation
DOCX
My project work
DOCX
Hostpital management system(srs)
PPT
Electronic cash controller
DOCX
hospital management system
PDF
Hospital Management System SRS
PPTX
Distributed system lamport's and vector algorithm
PPT
Medical Store Management System(MSMS)
PDF
HOSPITAL MANAGEMENT SYSTEM: FEATURES, REQUIREMENTS AND BENEFITS
PPTX
Underlying principles of parallel and distributed computing
DOCX
Leave Management System Documentation
hospital management System
Architectural Design in Software Engineering SE10
Introduction to Cloud Data Center and Network Issues
Hospital Management System (2nd Task)
Data center
Hospital Management System Project Report
Hospital Management System
Hospital management final report presentation
Data center Technologies
 
Hospital presentation
My project work
Hostpital management system(srs)
Electronic cash controller
hospital management system
Hospital Management System SRS
Distributed system lamport's and vector algorithm
Medical Store Management System(MSMS)
HOSPITAL MANAGEMENT SYSTEM: FEATURES, REQUIREMENTS AND BENEFITS
Underlying principles of parallel and distributed computing
Leave Management System Documentation
Ad

Similar to ERD.ppt (20)

PPTX
Entity relationship modelling - DE L300
PPT
entity-relationship-diagram-chen-&-crow -model.ppt
PPTX
Revision ch 3
PPTX
Entity Relationship Model
PPTX
entityrelationshipmodel.pptx
PPTX
Database part3-
PPT
Database design
PPTX
UNIT 1-RELATIONAL DATA MODEL for data base subject
PPTX
ER Modeling and Introduction to RDBMS
PDF
ICT DBA3 09 0710 Model Data Objects.pdf
PPTX
rdbms3, dbms,dbms,rdbmssssssssssssssssssssssssssssssssss
PPTX
RDBMS stands for Relational Database Management System
PDF
2 er
PDF
RDBMS Unit-2.pdf Entity Relationship Diagram
PPTX
COMPUTER PROGRAMMING-LESSON3-ENTITY.pptx
PPTX
COMPUTER PROGRAMMING-LESSON3-ENTITY.pptx
PPTX
Entity-Relationship Data Model
PPT
18306_lec-2 (1).ppt
PPT
Unit 2 ER Model.ppterfgmefwlgmkldfsmglkdfg
Entity relationship modelling - DE L300
entity-relationship-diagram-chen-&-crow -model.ppt
Revision ch 3
Entity Relationship Model
entityrelationshipmodel.pptx
Database part3-
Database design
UNIT 1-RELATIONAL DATA MODEL for data base subject
ER Modeling and Introduction to RDBMS
ICT DBA3 09 0710 Model Data Objects.pdf
rdbms3, dbms,dbms,rdbmssssssssssssssssssssssssssssssssss
RDBMS stands for Relational Database Management System
2 er
RDBMS Unit-2.pdf Entity Relationship Diagram
COMPUTER PROGRAMMING-LESSON3-ENTITY.pptx
COMPUTER PROGRAMMING-LESSON3-ENTITY.pptx
Entity-Relationship Data Model
18306_lec-2 (1).ppt
Unit 2 ER Model.ppterfgmefwlgmkldfsmglkdfg
Ad

More from ubaidullah75790 (20)

PPTX
Chapter20 transaction processing system .pptx
PPTX
Chapter22 database security in dbms.pptx
PPTX
Chapter27 distributed database syst.pptx
PPTX
File Organization in database management.pptx
PPTX
transaction processing databse management.pptx
PPT
physical database design distributed .ppt
PPT
module03-ipaddr ipv6 addressing in net.ppt
PPT
PDBD- Part2 physical database design.ppt
PPT
Physical_Design system development life.PPT
PPT
S3 application and network attacks in.ppt
PPT
Chapter 5 cyber security in computer.ppt
PPTX
1606802425-dba-w7 database management.pptx
PPT
ENCh18 database management system ss.ppt
PPT
Chapter07 database system in computer.ppt
PPT
Chapter05 database sytem in computer . ppt
PPT
Chapter04 database system in computer.ppt
PPT
Chapter03 database system in computer.ppt
PPT
Chapter02 database system in computer.ppt
PPT
Chapter01 database system in computer.ppt
PPT
MYCH8 database management system in .ppt
Chapter20 transaction processing system .pptx
Chapter22 database security in dbms.pptx
Chapter27 distributed database syst.pptx
File Organization in database management.pptx
transaction processing databse management.pptx
physical database design distributed .ppt
module03-ipaddr ipv6 addressing in net.ppt
PDBD- Part2 physical database design.ppt
Physical_Design system development life.PPT
S3 application and network attacks in.ppt
Chapter 5 cyber security in computer.ppt
1606802425-dba-w7 database management.pptx
ENCh18 database management system ss.ppt
Chapter07 database system in computer.ppt
Chapter05 database sytem in computer . ppt
Chapter04 database system in computer.ppt
Chapter03 database system in computer.ppt
Chapter02 database system in computer.ppt
Chapter01 database system in computer.ppt
MYCH8 database management system in .ppt

Recently uploaded (20)

PPTX
Why Generative AI is the Future of Content, Code & Creativity?
PPTX
assetexplorer- product-overview - presentation
PPTX
Advanced SystemCare Ultimate Crack + Portable (2025)
PPTX
Introduction to Windows Operating System
DOCX
How to Use SharePoint as an ISO-Compliant Document Management System
PPTX
Cybersecurity: Protecting the Digital World
PDF
How AI/LLM recommend to you ? GDG meetup 16 Aug by Fariman Guliev
PPTX
Oracle Fusion HCM Cloud Demo for Beginners
PPTX
"Secure File Sharing Solutions on AWS".pptx
PPTX
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
PPTX
GSA Content Generator Crack (2025 Latest)
PPTX
Weekly report ppt - harsh dattuprasad patel.pptx
PPTX
Monitoring Stack: Grafana, Loki & Promtail
PDF
Topaz Photo AI Crack New Download (Latest 2025)
PDF
DuckDuckGo Private Browser Premium APK for Android Crack Latest 2025
PPTX
Trending Python Topics for Data Visualization in 2025
PPTX
Patient Appointment Booking in Odoo with online payment
PDF
Wondershare Recoverit Full Crack New Version (Latest 2025)
PDF
Microsoft Office 365 Crack Download Free
PDF
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
Why Generative AI is the Future of Content, Code & Creativity?
assetexplorer- product-overview - presentation
Advanced SystemCare Ultimate Crack + Portable (2025)
Introduction to Windows Operating System
How to Use SharePoint as an ISO-Compliant Document Management System
Cybersecurity: Protecting the Digital World
How AI/LLM recommend to you ? GDG meetup 16 Aug by Fariman Guliev
Oracle Fusion HCM Cloud Demo for Beginners
"Secure File Sharing Solutions on AWS".pptx
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
GSA Content Generator Crack (2025 Latest)
Weekly report ppt - harsh dattuprasad patel.pptx
Monitoring Stack: Grafana, Loki & Promtail
Topaz Photo AI Crack New Download (Latest 2025)
DuckDuckGo Private Browser Premium APK for Android Crack Latest 2025
Trending Python Topics for Data Visualization in 2025
Patient Appointment Booking in Odoo with online payment
Wondershare Recoverit Full Crack New Version (Latest 2025)
Microsoft Office 365 Crack Download Free
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...

ERD.ppt

  • 1. 1 Entity Relationship Modeling Objectives: • To illustrate how relationships between entities are defined and refined. • To know how relationships are incorporated into the database design process. • To describe how ERD components affect database design and implementation.
  • 2. 2 1.0 What is Conceptual Database Design? • Process of describing the data, relationships between the data, relationships between the data, and the constraints on the data. • After analysis - Gather all the essential data required and understand how the data are related • The focus is on the data, rather than on the processes. • The output of the conceptual database design is a Conceptual Data Model ( + Data Dictionary)
  • 3. 3 2.0 Gathering Information for Conceptual Data Modeling • Two perspectives – Top-down • Data model is derived from an intimate understanding of the business. – Bottom-up • Data model is derived by reviewing specifications and business documents.
  • 4. 4 2.0 Entity-Relationship (ER) Modeling. • ER Modeling is a top-down approach to database design. • Entity Relationship (ER) Diagram – A detailed, logical representation of the entities, associations and data elements for an organization or business • Notation uses three main constructs – Data entities – Relationships – Attributes Chen Model & Crow’s Foot Model
  • 5. Person, place, object, event or concept about which data is to be maintained named property or characteristic of an entity Association between the instances of one or more entity types Represents a set or collection of objects in the real world that share the same properties Chen Notation EntityName Verb Phrase AttributeName
  • 6. Crow’s Foot Notation EntityName Entity Attribute EntityName List of Attributes Relationship Verb phrase Acceptable
  • 7. 7 2.1 Entities • Examples of entities: – Person: EMPLOYEE, STUDENT, PATIENT – Place: STORE, WAREHOUSE – Object: MACHINE, PRODUCT, CAR – Event: SALE,REGISTRATION, RENEWAL – Concept: ACCOUNT, COURSE • Guidelines for naming and defining entity types: – An entity type name is a singular noun – An entity type should be descriptive and specific – An entity name should be concise – Event entity types should be named for the result of the event, not the activity or process of the event.
  • 8. 8 2.2 Attributes • Example of entity types and associated attributes: STUDENT: Student_ID, Student_Name, Home_Address, Phone_Number, Major • Guidelines for naming attributes: – An attribute name is a noun. – An attribute name should be unique – To make an attribute name unique and clear, each attribute name should follow a standard format – Similar attributes of different entity types should use similar but distinguishing names.
  • 9. 9 2.2.1 Identifier Attributes • Candidate key – Attribute (or combination of attributes) that uniquely identifies each instance of an entity type – Some entities may have more than one candidate key • Ex: A candidate key for EMPLOYEE is Employee_ID, a second is the combination of Employee_Name and Address. • If there is more than one candidate key, need to make a choice. • Identifier – A candidate key that has been selected as the unique identifying characteristic for an entity type
  • 10. 10 2.2.2 Referential Attributes Name IdNum DeptID Email Ali 105 LG [email protected] Mary 106 IT [email protected] John 107 ENG [email protected] Lim 108 IT [email protected] Instance of Lecturer. Referential attribute: Ties the lecturer entity to another entity that is department. • Make Reference to another instance in another table
  • 12. 12 2.3 Relationships  Associations between instances of one or more entity types that is of interest  Given a name that describes its function. • relationship name is an active or a passive verb. Author Book Relationship name: writes An author writes one or more books A book can be written by one or more authors.
  • 13. 13 2.3.1 Degree of Relationships • Degree: number of entity types that participate in a relationship • Three cases – Unary: between two instances of one entity type – Binary: between the instances of two entity types – Ternary: among the instances of three entity types
  • 14. 14 2.4 Cardinality and Connectivity • Relationships can be classified as either • one – to – one • one – to – many • many – to –many • Cardinality : minimum and maximum number of instances of Entity B that can (or must be) associated with each instance of entity A. Connectivity
  • 15. 15 2.4 Cardinality and Connectivity Professor Class teaches A professor teaches class OR A class is taught by professor How Many?? Professor Class teaches
  • 16. 16 2.4 Cardinality and Connectivity Professor Class teaches Professor Class teaches 1 M Connectivity Connectivity (1,1) (1,1) (1,4) (1,4) Cardinality Cardinality
  • 17. 17 2.4.1 Connectivity • Chen Model – 1 to represent one. – M to represent many • Crow’s Foot many One One or many 1 M Mandatory one , means (1,1) Optional? – we’ll see after this
  • 18. 18 2.5 Binary Relationships • 1:M relationship – Relational modeling ideal – Should be the norm in any relational database design The 1: M relationship between PAINTER and PAINTING
  • 19. The Implemented 1:M relationship between PAINTER and PAINTING
  • 20. 20 2.5 Binary Relationships • 1:1 relationship – Should be rare in any relational database design – A single entity instance in one entity class is related to a single entity instance in another entity class – Could indicate that two entities actually belong in the same table
  • 21. The 1:1 Relationship Between PROFESSOR and DEPARTMENT
  • 23. 23 2.5 Binary Relationships • M:N relationships – Must be avoided because they lead to data redundancies. – Can be implemented by breaking it up to produce a set of 1:M relationships – Can avoid problems inherent to M:N relationship by creating a composite entity or bridge entity • This will be used to link the tables that were originally related in a M:N relationship • The composite entity structure includes-as foreign keys-at least the primary keys of the tables that are to be linked.
  • 24. The M:N Relationship Between STUDENT and CLASS This CANNOT be implemented as shown next….. Bowser Smithson Accounting 1 (ACCT-211) Intro to Microcomputing (CIS-220) Intro to Statistics (QM-261)
  • 25. The tables have many redundancies!! + CLASS_CODE CLASS_CODE + STU_NUM
  • 26. Changing the M:N relationship to TWO 1:M relationships
  • 27. Converting the M:N relationship into TWO 1:M relationships Foreign keys reference the primary keys in the other tables of which it has a relationship with The database designer has 2 main options to define a composite table’s primary key: either use the combination of those foreign keys or create a new primary key.
  • 28. 28 2.6 Mandatory vs. Optional Cardinalities • Specifies whether an instance must exist or can be absent in the relationship Lecturer Class handles A Lecturer may handle zero or many classes. A class is handled by one and only one Lecturer. Optional Mandatory (0,N) (1,1) Lecturer Class (0,N) (1,1) handles 1 M
  • 29. 29 2.7 How to Evaluate a Data Model? • A good data model has the following: – Accuracy and completeness – Non redundancy – Enforcement of business rules – Data Reusability – Stability and Flexibility – Communication Effectiveness – Simplicity
  • 30. 30 A Common Mistake Modeling the business processes or functions instead of the data. What data we want to keep?? We are interested in modeling the data, NOT the processes or functions that use or generate those data.
  • 31. 31 Example: Member Books Searches M N Is this part of the data requirement? Are we interested to know the books searched by the members? If answer is NO, then DO NOT include that as a relationship. Use other appropriate diagramming techniques to capture the business processes such as Data Flow Diagram. Do not mix up the use of ER Modeling with DFD.