SlideShare a Scribd company logo
Entity Relationship (E-R)
Model
DBMS
The Entity Relationship (E-R) Model
 E-R Model Components
 Entities
 In E-R models an entity refers to the entity set.
 An entity is represented by a rectangle containing the
entity’s name.
 Attributes
 Attributes are represented by ovals and are connected to
the entity with a line.
 Each oval contains the name of the attribute it represents.
 Attributes have a domain -- the attribute’s set of possible
values.
 Attributes may share a domain.
 Primary keys are underlined.
 Relationships
The Attributes of the STUDENT Entity
Basic E-R Model Entity Presentation
The Entity Relationship (E-R) Model
 Classes of Attributes
 A simple attribute cannot be subdivided.
 Examples: Age, Sex, and Marital status
 A composite attribute can be further subdivided
to yield additional attributes.
 Examples:
– ADDRESS 
 Street, City, State, Zip
– PHONE NUMBER  Area code, Exchange
number
The Entity Relationship (E-R) Model
 Classes of Attributes
 A single-valued attribute can have only a single value.
 Examples:
– A person can have only one social security number.
– A manufactured part can have only one serial
number.
 Multivalued attributes can have many values.
 Examples:
– A person may have several college degrees.
– A household may have several phones with different
numbers
 Multivalued attributes are shown by a double line
connecting to the entity.
The Entity Relationship (E-R) Model
 Multivalued Attribute in Relational DBMS
 The relational DBMS cannot implement multivalued
attributes.
 Possible courses of action for the designer
 Within the original entity, create several new attributes,
one for each of the original multivalued attribute’s
components.
 Create a new entity composed of the original multivalued
attribute’s components
Splitting the Multivalued Attributes into New Attributes
A New Entity Set Composed of Multivalued
Attribute’s Components
 A derived attribute is not physically stored within the
database; instead, it is derived by using an algorithm.
 Example: AGE can be derived from the data of birth and
the current date.
The Entity Relationship (E-R) Model
Figure: A Derived Attribute
 Relationships
 A relationship is an association between entities.
 Relationships are represented by diamond-shaped
symbols.
The Entity Relationship (E-R) Model
Figure :An Entity Relationship
 A relationship’s degree indicates the number of associated
entities or participants.
 A unary relationship exists when an association is maintained
within a single entity.
 A binary relationship exists when two entities are associated.
 A ternary relationship exists when three entities are associated.
The Entity Relationship (E-R) Model
 Connectivity
 The term connectivity is used to describe the
relationship classification (e.g., one-to-one, one-to-
many, and many-to-many).
The Entity Relationship (E-R) Model
Figure :Connectivity in an ERD
 Cardinality
 Cardinality expresses the specific number of entity
occurrences associated with one occurrence of the
related entity.
The Entity Relationship (E-R) Model
Figure :Cardinality in an ERD
 Relationship Participation
 The participation is optional if one entity occurrence
does not require a corresponding entity occurrence in a
particular relationship.
 An optional entity is shown by a small circle on the side
of the optional entity.
The Entity Relationship (E-R) Model
Figure : An ERD With An Optional Entity
Figure : CLASS is Optional to COURSE
Figure : COURSE and CLASS in a Mandatory Relationship
 Weak Entities
 A weak entity is an entity that
 Is existence-dependent and
 Has a primary key that is partially or totally derived
from the parent entity in the relationship.
 The existence of a weak entity is indicated by a
double rectangle.
 The weak entity inherits all or part of its primary key
from its strong counterpart.
The Entity Relationship (E-R) Model
A Weak Entity in an ERD
 Recursive Entities
 A recursive entity is one in which a relationship can
exist between occurrences of the same entity set.
 A recursive entity is found within a unary relationship.
The Entity Relationship (E-R) Model
Figure : An E-R Representation of Recursive Relationships
 Composite Entities
 A composite entity is composed of the primary
keys of each of the entities to be connected.
 The composite entity serves as a bridge between
the related entities.
 The composite entity may contain additional
attributes.
The Entity Relationship (E-R) Model
The M:N Relationship Between STUDENT and CLASS
A Composite Entity in the ERD
Developing an E-R Diagram
 The process of database design is an iterative rather
than a linear or sequential process.
 It usually begins with a general narrative of the
organization’s operations and procedures.
 The basic E-R model is graphically depicted and
presented for review.
 The process is repeated until the end users and
designers agree that the E-R diagram is a fair
representation of the organization’s activities and
functions.
 B.D. College Database (1)
 College is divided into several schools. Each
school is administered by a dean. A 1:1
relationship exists between DEAN and SCHOOL.
 Each dean is a member of a group of
administrators (ADMINISTRATOR). Deans also
hold professorial rank and may teach a class
(PROFESSOR). Administrators and professors are
also Employees.
Developing an E-R Diagram
enrity relationship model and diagram .ppt
Developing an E-R Diagram
 B.D. College Database (2)
 Each school is composed of several departments.
 The smallest number of departments operated by a
school is one, and the largest number of departments
is indeterminate (N).
 Each department belongs to only a single school.
Figure : The First B.D. College ERD Segment
 B.D. College Database (3)
 Each department offers several courses.
Developing an E-R Diagram
Figure : The Second B.D. College ERD Segment
 B.D. College Database (4)
 A department may offer several sections (classes) of
the same course.
 A 1:M relationship exists between COURSE and CLASS.
 CLASS is optional to COURSE
Developing an E-R Diagram
Figure : The Third B.D. College ERD Segment
 B.D. College Database (5)
 Each department has many professors assigned to it.
 One of those professors chairs the department. Only
one of the professors can chair the department.
 DEPARTMENT is optional to PROFESSOR in the
“chairs” relationship.
Developing an E-R Diagram
Figure : The Fourth B.D. College ERD Segment
 B.D. College Database (6)
 Each professor may teach up to four classes,
each one a section of a course.
 A professor may also be on a research contract
and teach no classes.
Developing an E-R Diagram
Figure : The Fifth B.D. College ERD Segment
 B.D. College Database (7)
 A student may enroll in several classes, but (s)he takes
each class only once during any given enrollment
period.
 Each student may enroll in up to six classes and each
class may have up to 35 students in it.
 STUDENT is optional to CLASS.
Developing an E-R Diagram
Figure : The Sixth B.D. College ERD Segment
 B.D. College Database (8)
 Each department has several students whose major is
offered by that department.
 Each student has only a single major and associated
with a single department.
Developing an E-R Diagram
Figure : The Seventh B.D. College ERD Segment
 B.D. College Database (9)
 Each student has an advisor in his or her department;
each advisor counsels several students.
 An advisor is also a professor, but not all professors
advise students.
Developing an E-R Diagram
Figure : The Eighth B.D. College ERD Segment
Entities for the B.D. College Database
 SCHOOL
 DEPARMENT
 EMPLOYEE
 PROFESSOR
 COURSE
 CLASS
 ENROLL (Bridge between
STUDENT and CLASS)
 STUDENT
Developing an E-R Diagram
Components of the E-R Model
enrity relationship model and diagram .ppt
Extended E-R Features: Specialization
 Top-down design process; we designate subgroupings
within an entity set that are distinctive from other
entities in the set.
 These subgroupings become lower-level entity sets
that have attributes or participate in relationships that
do not apply to the higher-level entity set.
 Depicted by a triangle component labeled ISA (E.g.
customer “is a” person).
 Attribute inheritance – a lower-level entity set inherits
all the attributes and relationship participation of the
higher-level entity set to which it is linked.
Specialization Example
Extended ER Features: Generalization
 A bottom-up design process – combine a number of
entity sets that share the same features into a higher-
level entity set.
 Specialization and generalization are simple inversions
of each other; they are represented in an E-R diagram
in the same way.
 The terms specialization and generalization are used
interchangeably.
Specialization and Generalization (Cont.)
 Can have multiple specializations of an entity set
based on different features.
 E.g. permanent_employee vs. temporary_employee, in
addition to officer vs. secretary vs. teller
 Each particular employee would be
 a member of one of
permanent_employee or
temporary_employee,
 and also a member of one of officer,
secretary, or teller
 The ISA relationship also referred to as superclass -
subclass relationship
Aggregation
 Consider the ternary relationship works_on
 Suppose we want to record managers for tasks performed by an
employee at a branch
Aggregation (Cont.)
 Relationship sets works_on and manages represent
overlapping information
 Every manages relationship corresponds to a works_on
relationship
 However, some works_on relationships may not correspond to
any manages relationships
 So we can’t discard the works_on relationship
 Eliminate this redundancy via aggregation
 Treat relationship as an abstract entity
 Allows relationships between relationships
 Abstraction of relationship into new entity
 Without introducing redundancy, the following diagram
represents:
 An employee works on a particular job at a particular branch
 An employee, branch, job combination may have an
associated manager
E-R Diagram With Aggregation
Summary of Symbols Used in E-R Notation

More Related Content

PPT
ER model
ShilpaDe
 
PPT
ER model
ShilpaDe
 
PPTX
E_R-Diagram (2).pptx
sandeep54552
 
PPTX
E_R-Diagram (2).pptx
sandeep54552
 
PPTX
Entity-Relationship Diagram (ERD) Material.pptx
sastradipraja
 
PPTX
Entity-Relationship Diagram (ERD) Material.pptx
sastradipraja
 
PPTX
Entity relationship Models from Chapter 4
ssuserb53446
 
PPTX
Entity relationship Models from Chapter 4
ssuserb53446
 
ER model
ShilpaDe
 
ER model
ShilpaDe
 
E_R-Diagram (2).pptx
sandeep54552
 
E_R-Diagram (2).pptx
sandeep54552
 
Entity-Relationship Diagram (ERD) Material.pptx
sastradipraja
 
Entity-Relationship Diagram (ERD) Material.pptx
sastradipraja
 
Entity relationship Models from Chapter 4
ssuserb53446
 
Entity relationship Models from Chapter 4
ssuserb53446
 

Similar to enrity relationship model and diagram .ppt (20)

PPTX
Database Design and Entity relationship Model.pptx
yamuna67903
 
PPTX
Database Design and Entity relationship Model.pptx
yamuna67903
 
PDF
Lecture 2 database management system.pdf
samerelking3
 
PDF
Lecture 2 database management system.pdf
samerelking3
 
PPT
ER_model
Qasim Zahid
 
PPT
ER_model
Qasim Zahid
 
PPTX
database.pptx
lumaeducation
 
PPTX
database.pptx
lumaeducation
 
PPT
Database Management System
FellowBuddy.com
 
PPT
Database Management System
FellowBuddy.com
 
PDF
dbms mannual.pdf
DevidasBhere
 
PDF
dbms mannual.pdf
DevidasBhere
 
PPT
Entity relationship modelling
Dr. C.V. Suresh Babu
 
PPT
Entity relationship modelling
Dr. C.V. Suresh Babu
 
PPT
3144-unit-1entityrmodel-171122051336.ppt
Uma Kakarlapudi
 
PPT
3144-unit-1entityrmodel-171122051336.ppt
Uma Kakarlapudi
 
PPTX
Entity Relationship Diagram – ER Diagram in DBMS.pptx
sukrithlal008
 
PPTX
Entity Relationship Diagram – ER Diagram in DBMS.pptx
sukrithlal008
 
PPTX
Entity Relationship Diagram – ER Diagram in DBMS.pptx
farsankadavandy
 
PPTX
Entity Relationship Diagram – ER Diagram in DBMS.pptx
farsankadavandy
 
Database Design and Entity relationship Model.pptx
yamuna67903
 
Database Design and Entity relationship Model.pptx
yamuna67903
 
Lecture 2 database management system.pdf
samerelking3
 
Lecture 2 database management system.pdf
samerelking3
 
ER_model
Qasim Zahid
 
ER_model
Qasim Zahid
 
database.pptx
lumaeducation
 
database.pptx
lumaeducation
 
Database Management System
FellowBuddy.com
 
Database Management System
FellowBuddy.com
 
dbms mannual.pdf
DevidasBhere
 
dbms mannual.pdf
DevidasBhere
 
Entity relationship modelling
Dr. C.V. Suresh Babu
 
Entity relationship modelling
Dr. C.V. Suresh Babu
 
3144-unit-1entityrmodel-171122051336.ppt
Uma Kakarlapudi
 
3144-unit-1entityrmodel-171122051336.ppt
Uma Kakarlapudi
 
Entity Relationship Diagram – ER Diagram in DBMS.pptx
sukrithlal008
 
Entity Relationship Diagram – ER Diagram in DBMS.pptx
sukrithlal008
 
Entity Relationship Diagram – ER Diagram in DBMS.pptx
farsankadavandy
 
Entity Relationship Diagram – ER Diagram in DBMS.pptx
farsankadavandy
 
Ad

Recently uploaded (20)

PDF
Bandai Playdia The Book - David Glotz
BluePanther6
 
PDF
Generating Union types w/ Static Analysis
K. Matthew Dupree
 
PDF
Download iTop VPN Free 6.1.0.5882 Crack Full Activated Pre Latest 2025
imang66g
 
PPTX
Explanation about Structures in C language.pptx
Veeral Rathod
 
PPTX
slidesgo-unlocking-the-code-the-dynamic-dance-of-variables-and-constants-2024...
kr2589474
 
PDF
Summary Of Odoo 18.1 to 18.4 : The Way For Odoo 19
CandidRoot Solutions Private Limited
 
PPTX
Presentation about variables and constant.pptx
safalsingh810
 
PDF
New Download FL Studio Crack Full Version [Latest 2025]
imang66g
 
PPT
Activate_Methodology_Summary presentatio
annapureddyn
 
PDF
What to consider before purchasing Microsoft 365 Business Premium_PDF.pdf
Q-Advise
 
PDF
lesson-2-rules-of-netiquette.pdf.bshhsjdj
jasmenrojas249
 
PPTX
classification of computer and basic part of digital computer
ravisinghrajpurohit3
 
PDF
ChatPharo: an Open Architecture for Understanding How to Talk Live to LLMs
ESUG
 
PPTX
Contractor Management Platform and Software Solution for Compliance
SHEQ Network Limited
 
PPTX
The-Dawn-of-AI-Reshaping-Our-World.pptxx
parthbhanushali307
 
PDF
New Download MiniTool Partition Wizard Crack Latest Version 2025
imang66g
 
PPTX
Can You Build Dashboards Using Open Source Visualization Tool.pptx
Varsha Nayak
 
PDF
10 posting ideas for community engagement with AI prompts
Pankaj Taneja
 
PPTX
Maximizing Revenue with Marketo Measure: A Deep Dive into Multi-Touch Attribu...
bbedford2
 
PDF
On Software Engineers' Productivity - Beyond Misleading Metrics
Romén Rodríguez-Gil
 
Bandai Playdia The Book - David Glotz
BluePanther6
 
Generating Union types w/ Static Analysis
K. Matthew Dupree
 
Download iTop VPN Free 6.1.0.5882 Crack Full Activated Pre Latest 2025
imang66g
 
Explanation about Structures in C language.pptx
Veeral Rathod
 
slidesgo-unlocking-the-code-the-dynamic-dance-of-variables-and-constants-2024...
kr2589474
 
Summary Of Odoo 18.1 to 18.4 : The Way For Odoo 19
CandidRoot Solutions Private Limited
 
Presentation about variables and constant.pptx
safalsingh810
 
New Download FL Studio Crack Full Version [Latest 2025]
imang66g
 
Activate_Methodology_Summary presentatio
annapureddyn
 
What to consider before purchasing Microsoft 365 Business Premium_PDF.pdf
Q-Advise
 
lesson-2-rules-of-netiquette.pdf.bshhsjdj
jasmenrojas249
 
classification of computer and basic part of digital computer
ravisinghrajpurohit3
 
ChatPharo: an Open Architecture for Understanding How to Talk Live to LLMs
ESUG
 
Contractor Management Platform and Software Solution for Compliance
SHEQ Network Limited
 
The-Dawn-of-AI-Reshaping-Our-World.pptxx
parthbhanushali307
 
New Download MiniTool Partition Wizard Crack Latest Version 2025
imang66g
 
Can You Build Dashboards Using Open Source Visualization Tool.pptx
Varsha Nayak
 
10 posting ideas for community engagement with AI prompts
Pankaj Taneja
 
Maximizing Revenue with Marketo Measure: A Deep Dive into Multi-Touch Attribu...
bbedford2
 
On Software Engineers' Productivity - Beyond Misleading Metrics
Romén Rodríguez-Gil
 
Ad

enrity relationship model and diagram .ppt

  • 2. The Entity Relationship (E-R) Model  E-R Model Components  Entities  In E-R models an entity refers to the entity set.  An entity is represented by a rectangle containing the entity’s name.  Attributes  Attributes are represented by ovals and are connected to the entity with a line.  Each oval contains the name of the attribute it represents.  Attributes have a domain -- the attribute’s set of possible values.  Attributes may share a domain.  Primary keys are underlined.  Relationships
  • 3. The Attributes of the STUDENT Entity
  • 4. Basic E-R Model Entity Presentation
  • 5. The Entity Relationship (E-R) Model  Classes of Attributes  A simple attribute cannot be subdivided.  Examples: Age, Sex, and Marital status  A composite attribute can be further subdivided to yield additional attributes.  Examples: – ADDRESS   Street, City, State, Zip – PHONE NUMBER  Area code, Exchange number
  • 6. The Entity Relationship (E-R) Model  Classes of Attributes  A single-valued attribute can have only a single value.  Examples: – A person can have only one social security number. – A manufactured part can have only one serial number.  Multivalued attributes can have many values.  Examples: – A person may have several college degrees. – A household may have several phones with different numbers  Multivalued attributes are shown by a double line connecting to the entity.
  • 7. The Entity Relationship (E-R) Model  Multivalued Attribute in Relational DBMS  The relational DBMS cannot implement multivalued attributes.  Possible courses of action for the designer  Within the original entity, create several new attributes, one for each of the original multivalued attribute’s components.  Create a new entity composed of the original multivalued attribute’s components
  • 8. Splitting the Multivalued Attributes into New Attributes
  • 9. A New Entity Set Composed of Multivalued Attribute’s Components
  • 10.  A derived attribute is not physically stored within the database; instead, it is derived by using an algorithm.  Example: AGE can be derived from the data of birth and the current date. The Entity Relationship (E-R) Model Figure: A Derived Attribute
  • 11.  Relationships  A relationship is an association between entities.  Relationships are represented by diamond-shaped symbols. The Entity Relationship (E-R) Model Figure :An Entity Relationship
  • 12.  A relationship’s degree indicates the number of associated entities or participants.  A unary relationship exists when an association is maintained within a single entity.  A binary relationship exists when two entities are associated.  A ternary relationship exists when three entities are associated. The Entity Relationship (E-R) Model
  • 13.  Connectivity  The term connectivity is used to describe the relationship classification (e.g., one-to-one, one-to- many, and many-to-many). The Entity Relationship (E-R) Model Figure :Connectivity in an ERD
  • 14.  Cardinality  Cardinality expresses the specific number of entity occurrences associated with one occurrence of the related entity. The Entity Relationship (E-R) Model Figure :Cardinality in an ERD
  • 15.  Relationship Participation  The participation is optional if one entity occurrence does not require a corresponding entity occurrence in a particular relationship.  An optional entity is shown by a small circle on the side of the optional entity. The Entity Relationship (E-R) Model Figure : An ERD With An Optional Entity
  • 16. Figure : CLASS is Optional to COURSE Figure : COURSE and CLASS in a Mandatory Relationship
  • 17.  Weak Entities  A weak entity is an entity that  Is existence-dependent and  Has a primary key that is partially or totally derived from the parent entity in the relationship.  The existence of a weak entity is indicated by a double rectangle.  The weak entity inherits all or part of its primary key from its strong counterpart. The Entity Relationship (E-R) Model
  • 18. A Weak Entity in an ERD
  • 19.  Recursive Entities  A recursive entity is one in which a relationship can exist between occurrences of the same entity set.  A recursive entity is found within a unary relationship. The Entity Relationship (E-R) Model Figure : An E-R Representation of Recursive Relationships
  • 20.  Composite Entities  A composite entity is composed of the primary keys of each of the entities to be connected.  The composite entity serves as a bridge between the related entities.  The composite entity may contain additional attributes. The Entity Relationship (E-R) Model
  • 21. The M:N Relationship Between STUDENT and CLASS
  • 22. A Composite Entity in the ERD
  • 23. Developing an E-R Diagram  The process of database design is an iterative rather than a linear or sequential process.  It usually begins with a general narrative of the organization’s operations and procedures.  The basic E-R model is graphically depicted and presented for review.  The process is repeated until the end users and designers agree that the E-R diagram is a fair representation of the organization’s activities and functions.
  • 24.  B.D. College Database (1)  College is divided into several schools. Each school is administered by a dean. A 1:1 relationship exists between DEAN and SCHOOL.  Each dean is a member of a group of administrators (ADMINISTRATOR). Deans also hold professorial rank and may teach a class (PROFESSOR). Administrators and professors are also Employees. Developing an E-R Diagram
  • 26. Developing an E-R Diagram  B.D. College Database (2)  Each school is composed of several departments.  The smallest number of departments operated by a school is one, and the largest number of departments is indeterminate (N).  Each department belongs to only a single school. Figure : The First B.D. College ERD Segment
  • 27.  B.D. College Database (3)  Each department offers several courses. Developing an E-R Diagram Figure : The Second B.D. College ERD Segment
  • 28.  B.D. College Database (4)  A department may offer several sections (classes) of the same course.  A 1:M relationship exists between COURSE and CLASS.  CLASS is optional to COURSE Developing an E-R Diagram Figure : The Third B.D. College ERD Segment
  • 29.  B.D. College Database (5)  Each department has many professors assigned to it.  One of those professors chairs the department. Only one of the professors can chair the department.  DEPARTMENT is optional to PROFESSOR in the “chairs” relationship. Developing an E-R Diagram Figure : The Fourth B.D. College ERD Segment
  • 30.  B.D. College Database (6)  Each professor may teach up to four classes, each one a section of a course.  A professor may also be on a research contract and teach no classes. Developing an E-R Diagram Figure : The Fifth B.D. College ERD Segment
  • 31.  B.D. College Database (7)  A student may enroll in several classes, but (s)he takes each class only once during any given enrollment period.  Each student may enroll in up to six classes and each class may have up to 35 students in it.  STUDENT is optional to CLASS. Developing an E-R Diagram Figure : The Sixth B.D. College ERD Segment
  • 32.  B.D. College Database (8)  Each department has several students whose major is offered by that department.  Each student has only a single major and associated with a single department. Developing an E-R Diagram Figure : The Seventh B.D. College ERD Segment
  • 33.  B.D. College Database (9)  Each student has an advisor in his or her department; each advisor counsels several students.  An advisor is also a professor, but not all professors advise students. Developing an E-R Diagram Figure : The Eighth B.D. College ERD Segment
  • 34. Entities for the B.D. College Database  SCHOOL  DEPARMENT  EMPLOYEE  PROFESSOR  COURSE  CLASS  ENROLL (Bridge between STUDENT and CLASS)  STUDENT Developing an E-R Diagram
  • 35. Components of the E-R Model
  • 37. Extended E-R Features: Specialization  Top-down design process; we designate subgroupings within an entity set that are distinctive from other entities in the set.  These subgroupings become lower-level entity sets that have attributes or participate in relationships that do not apply to the higher-level entity set.  Depicted by a triangle component labeled ISA (E.g. customer “is a” person).  Attribute inheritance – a lower-level entity set inherits all the attributes and relationship participation of the higher-level entity set to which it is linked.
  • 39. Extended ER Features: Generalization  A bottom-up design process – combine a number of entity sets that share the same features into a higher- level entity set.  Specialization and generalization are simple inversions of each other; they are represented in an E-R diagram in the same way.  The terms specialization and generalization are used interchangeably.
  • 40. Specialization and Generalization (Cont.)  Can have multiple specializations of an entity set based on different features.  E.g. permanent_employee vs. temporary_employee, in addition to officer vs. secretary vs. teller  Each particular employee would be  a member of one of permanent_employee or temporary_employee,  and also a member of one of officer, secretary, or teller  The ISA relationship also referred to as superclass - subclass relationship
  • 41. Aggregation  Consider the ternary relationship works_on  Suppose we want to record managers for tasks performed by an employee at a branch
  • 42. Aggregation (Cont.)  Relationship sets works_on and manages represent overlapping information  Every manages relationship corresponds to a works_on relationship  However, some works_on relationships may not correspond to any manages relationships  So we can’t discard the works_on relationship  Eliminate this redundancy via aggregation  Treat relationship as an abstract entity  Allows relationships between relationships  Abstraction of relationship into new entity  Without introducing redundancy, the following diagram represents:  An employee works on a particular job at a particular branch  An employee, branch, job combination may have an associated manager
  • 43. E-R Diagram With Aggregation
  • 44. Summary of Symbols Used in E-R Notation