SlideShare a Scribd company logo
Entity-Relationship Data
Model
Alex Ostrovsky
Presentation Overview
►Short historical overview
►Elements of E-R Model
►Basic organization & relationships in E-R
Model
►Design principles
History of E-R Model
► E-R Model was proposed
by Dr. Peter Chen
(currently professor at
Louisiana State
University)
► Chen’s original paper on
E-R Model is the 35th
most sited paper in
computer science
► Chen has written papers
interconnecting E-R
model and linguistics
Introduction
►Database Structure is often called Database
Schema
►E-R model is graphical in nature, thus
making it easy to analyze and observe
relationship between data elements
►Most DBMS are based upon E-R model
►E-R model is not a good match for the
sophisticated data structures required in
today’s DBMS
Elements of E-R Model
►Data represented graphically via entity-
relationship diagram which contains 3 main
element types:
 Entity sets
 Attributes
 Relationships
Entity sets, Attributes, Relationships
► Entity set
 Is an abstract object, collection of such objects forms
an entity set.
 Similar notion as in OO design
► Attribute:
 Some concrete data (or object type) by which entity set
is defined
► Relationship
 Specific connection between 2 or more entity sets
E-R Diagram
►Represents E-R elements by nodes of
specific shape to indicate kind
 Entity sets are represented by rectangles
 Attributes are shown as ovals
 Relationships correspond to diamonds
►Simple example from the book:
Simple illustration
Instances of E-R diagram
►DB described by E-R will contain specific
data (i.e. database instance)
►Each entity set will contain a particular finite
set of entities
►Each entity contains a particular value for
each attribute
►E-R data is not stored directly in DB
E-R Relationships
► Suppose R is a relationship connecting entity sets
E and F. Then:
 If each member of E can be connected by R to at
most one member of F, then we say that R is many-
one from E to F. Note that in a many-one relationship
from E to F, each entity in F can be connected to many
members of E.
 If R is both many-one from E to F and many-one from F
to E, then we say that R is one-one. In a one-one
relationship an entity of either entity set can be
connected to at most one entity of the other set.
 If R is neither many-one from E to F or from F to E,
then we say R is many-many
Multi-way relationships
► There is a relationship Sequel-of between the entity set
Movies and itself.
► To differentiate the two movies in a relationship, one line
is labeled by the role Original and one by the role Sequel,
indicating the original movie and its sequel, respectively.
Relationships Continued
►Some data models limit relationships to be
binary
►It is possible to convert multi-way
relationship into a collection of binary many-
one relationships
►Need to introduce a connecting entity set,
which will act as a bridge between smaller
sets which come from splitting a larger
multi-way relationship set.
►Connecting entity set might have its own
attributes
Design Principles
► Faithfulness:
 Design has to comply strictly with specifications
 Logical attributes and relationships
► Avoid redundancy
► "Everything should be made as simple as possible,
but not simpler.” Albert Einstein
► Choose right relationships
► Select right elements
 Many choices exist between using attributes and using
entity set/relationship combinations
 An attribute is simpler to implement than either entity
set or a relationship
Design Principals Cont.
►To replace an entity set by an attribute or
attributes of several entity sets 3 conditions
must be enforced:
 All relationships in which entity set is involved
must have arrows entering it. That is, it must be
the “one” in many-one relationships, or its
generalization for the case of multi-way
relationships.
 The attributes for E must collectively identify an
entity. if there are several attributes, then no
attribute must depend on the other attributes
 No relationship involves E more than once
Thank You.

More Related Content

Similar to ER diagram - Krishna Geetha.ppt

Er Modeling
Er ModelingEr Modeling
Er model
Er modelEr model
Er model
Surkhab Shelly
 
27 fcs157al3
27 fcs157al327 fcs157al3
27 fcs157al3
CHANDRA BHUSHAN
 
U2_ER_upto_map_relations.pdf
U2_ER_upto_map_relations.pdfU2_ER_upto_map_relations.pdf
U2_ER_upto_map_relations.pdf
ssusera7b660
 
U2_ER_modeling.pptx
U2_ER_modeling.pptxU2_ER_modeling.pptx
U2_ER_modeling.pptx
ssusera7b660
 
Dada Modeling.pptx
Dada Modeling.pptxDada Modeling.pptx
Dada Modeling.pptx
Ujjwala Sachin Patil
 
Entity Relationship Modelling
Entity Relationship ModellingEntity Relationship Modelling
Entity Relationship Modelling
Bhandari Nawaraj
 
Reasoning Over Knowledge Base
Reasoning Over Knowledge BaseReasoning Over Knowledge Base
Reasoning Over Knowledge Base
Shubham Agarwal
 
Reasoning Over Knowledge Base
Reasoning Over Knowledge BaseReasoning Over Knowledge Base
Reasoning Over Knowledge Base
Shubham Agarwal
 
Er diagrams presentation
Er diagrams presentationEr diagrams presentation
Er diagrams presentation
Akanksha Jaiswal
 
Er diagrams presentation
Er diagrams presentationEr diagrams presentation
Er diagrams presentation
Akanksha Jaiswal
 
Er Model Nandha&Mani
Er Model Nandha&ManiEr Model Nandha&Mani
Er Model Nandha&Mani
guest1e0229a
 
E - R Models.pptx SQL and plsql database
E - R Models.pptx SQL and plsql databaseE - R Models.pptx SQL and plsql database
E - R Models.pptx SQL and plsql database
ironman82715
 
dbms mannual.pdf
dbms mannual.pdfdbms mannual.pdf
dbms mannual.pdf
DevidasBhere
 
Data Modeling and Database Design 2nd Edition by Umanath Scamell Solution Manual
Data Modeling and Database Design 2nd Edition by Umanath Scamell Solution ManualData Modeling and Database Design 2nd Edition by Umanath Scamell Solution Manual
Data Modeling and Database Design 2nd Edition by Umanath Scamell Solution Manual
endokayle
 
erdiagramspresentation-150826044953-lva1-app6891.pdf
erdiagramspresentation-150826044953-lva1-app6891.pdferdiagramspresentation-150826044953-lva1-app6891.pdf
erdiagramspresentation-150826044953-lva1-app6891.pdf
vinayakjadhav94
 
Chapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptxChapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptx
santosh96234
 
Pertemuan-4------------------------------------------------
Pertemuan-4------------------------------------------------Pertemuan-4------------------------------------------------
Pertemuan-4------------------------------------------------
keishaangelina2
 
Entityrelationshipmodel
EntityrelationshipmodelEntityrelationshipmodel
Entityrelationshipmodel
Enes Bolfidan
 
Unit 3 final.pptx
Unit 3 final.pptxUnit 3 final.pptx
Unit 3 final.pptx
MaximusAranha
 

Similar to ER diagram - Krishna Geetha.ppt (20)

Er Modeling
Er ModelingEr Modeling
Er Modeling
 
Er model
Er modelEr model
Er model
 
27 fcs157al3
27 fcs157al327 fcs157al3
27 fcs157al3
 
U2_ER_upto_map_relations.pdf
U2_ER_upto_map_relations.pdfU2_ER_upto_map_relations.pdf
U2_ER_upto_map_relations.pdf
 
U2_ER_modeling.pptx
U2_ER_modeling.pptxU2_ER_modeling.pptx
U2_ER_modeling.pptx
 
Dada Modeling.pptx
Dada Modeling.pptxDada Modeling.pptx
Dada Modeling.pptx
 
Entity Relationship Modelling
Entity Relationship ModellingEntity Relationship Modelling
Entity Relationship Modelling
 
Reasoning Over Knowledge Base
Reasoning Over Knowledge BaseReasoning Over Knowledge Base
Reasoning Over Knowledge Base
 
Reasoning Over Knowledge Base
Reasoning Over Knowledge BaseReasoning Over Knowledge Base
Reasoning Over Knowledge Base
 
Er diagrams presentation
Er diagrams presentationEr diagrams presentation
Er diagrams presentation
 
Er diagrams presentation
Er diagrams presentationEr diagrams presentation
Er diagrams presentation
 
Er Model Nandha&Mani
Er Model Nandha&ManiEr Model Nandha&Mani
Er Model Nandha&Mani
 
E - R Models.pptx SQL and plsql database
E - R Models.pptx SQL and plsql databaseE - R Models.pptx SQL and plsql database
E - R Models.pptx SQL and plsql database
 
dbms mannual.pdf
dbms mannual.pdfdbms mannual.pdf
dbms mannual.pdf
 
Data Modeling and Database Design 2nd Edition by Umanath Scamell Solution Manual
Data Modeling and Database Design 2nd Edition by Umanath Scamell Solution ManualData Modeling and Database Design 2nd Edition by Umanath Scamell Solution Manual
Data Modeling and Database Design 2nd Edition by Umanath Scamell Solution Manual
 
erdiagramspresentation-150826044953-lva1-app6891.pdf
erdiagramspresentation-150826044953-lva1-app6891.pdferdiagramspresentation-150826044953-lva1-app6891.pdf
erdiagramspresentation-150826044953-lva1-app6891.pdf
 
Chapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptxChapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptx
 
Pertemuan-4------------------------------------------------
Pertemuan-4------------------------------------------------Pertemuan-4------------------------------------------------
Pertemuan-4------------------------------------------------
 
Entityrelationshipmodel
EntityrelationshipmodelEntityrelationshipmodel
Entityrelationshipmodel
 
Unit 3 final.pptx
Unit 3 final.pptxUnit 3 final.pptx
Unit 3 final.pptx
 

More from ComputerScienceDepar6

Magnetic disk - Krishna Geetha.ppt
Magnetic disk  - Krishna Geetha.pptMagnetic disk  - Krishna Geetha.ppt
Magnetic disk - Krishna Geetha.ppt
ComputerScienceDepar6
 
Indexing and hashing.ppt
Indexing and hashing.pptIndexing and hashing.ppt
Indexing and hashing.ppt
ComputerScienceDepar6
 
Join Operation.pptx
Join Operation.pptxJoin Operation.pptx
Join Operation.pptx
ComputerScienceDepar6
 
Introduction to Structured Query Language (SQL) (1).ppt
Introduction to Structured Query Language (SQL) (1).pptIntroduction to Structured Query Language (SQL) (1).ppt
Introduction to Structured Query Language (SQL) (1).ppt
ComputerScienceDepar6
 
KEY FRAME SYSTEM-Ruby Stella mary.pptx
KEY FRAME SYSTEM-Ruby Stella mary.pptxKEY FRAME SYSTEM-Ruby Stella mary.pptx
KEY FRAME SYSTEM-Ruby Stella mary.pptx
ComputerScienceDepar6
 
Fourier series-P.Ruby Stella Mary.pptx
Fourier series-P.Ruby Stella Mary.pptxFourier series-P.Ruby Stella Mary.pptx
Fourier series-P.Ruby Stella Mary.pptx
ComputerScienceDepar6
 
computer animation languages-N.Kavitha.pptx
computer animation languages-N.Kavitha.pptxcomputer animation languages-N.Kavitha.pptx
computer animation languages-N.Kavitha.pptx
ComputerScienceDepar6
 
Three dimensional graphics package.N.kavitha.pptx
Three dimensional graphics package.N.kavitha.pptxThree dimensional graphics package.N.kavitha.pptx
Three dimensional graphics package.N.kavitha.pptx
ComputerScienceDepar6
 

More from ComputerScienceDepar6 (8)

Magnetic disk - Krishna Geetha.ppt
Magnetic disk  - Krishna Geetha.pptMagnetic disk  - Krishna Geetha.ppt
Magnetic disk - Krishna Geetha.ppt
 
Indexing and hashing.ppt
Indexing and hashing.pptIndexing and hashing.ppt
Indexing and hashing.ppt
 
Join Operation.pptx
Join Operation.pptxJoin Operation.pptx
Join Operation.pptx
 
Introduction to Structured Query Language (SQL) (1).ppt
Introduction to Structured Query Language (SQL) (1).pptIntroduction to Structured Query Language (SQL) (1).ppt
Introduction to Structured Query Language (SQL) (1).ppt
 
KEY FRAME SYSTEM-Ruby Stella mary.pptx
KEY FRAME SYSTEM-Ruby Stella mary.pptxKEY FRAME SYSTEM-Ruby Stella mary.pptx
KEY FRAME SYSTEM-Ruby Stella mary.pptx
 
Fourier series-P.Ruby Stella Mary.pptx
Fourier series-P.Ruby Stella Mary.pptxFourier series-P.Ruby Stella Mary.pptx
Fourier series-P.Ruby Stella Mary.pptx
 
computer animation languages-N.Kavitha.pptx
computer animation languages-N.Kavitha.pptxcomputer animation languages-N.Kavitha.pptx
computer animation languages-N.Kavitha.pptx
 
Three dimensional graphics package.N.kavitha.pptx
Three dimensional graphics package.N.kavitha.pptxThree dimensional graphics package.N.kavitha.pptx
Three dimensional graphics package.N.kavitha.pptx
 

Recently uploaded

PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
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
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
Celine George
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
National Information Standards Organization (NISO)
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
NgcHiNguyn25
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 

Recently uploaded (20)

PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
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
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 

ER diagram - Krishna Geetha.ppt

  • 2. Presentation Overview ►Short historical overview ►Elements of E-R Model ►Basic organization & relationships in E-R Model ►Design principles
  • 3. History of E-R Model ► E-R Model was proposed by Dr. Peter Chen (currently professor at Louisiana State University) ► Chen’s original paper on E-R Model is the 35th most sited paper in computer science ► Chen has written papers interconnecting E-R model and linguistics
  • 4. Introduction ►Database Structure is often called Database Schema ►E-R model is graphical in nature, thus making it easy to analyze and observe relationship between data elements ►Most DBMS are based upon E-R model ►E-R model is not a good match for the sophisticated data structures required in today’s DBMS
  • 5. Elements of E-R Model ►Data represented graphically via entity- relationship diagram which contains 3 main element types:  Entity sets  Attributes  Relationships
  • 6. Entity sets, Attributes, Relationships ► Entity set  Is an abstract object, collection of such objects forms an entity set.  Similar notion as in OO design ► Attribute:  Some concrete data (or object type) by which entity set is defined ► Relationship  Specific connection between 2 or more entity sets
  • 7. E-R Diagram ►Represents E-R elements by nodes of specific shape to indicate kind  Entity sets are represented by rectangles  Attributes are shown as ovals  Relationships correspond to diamonds ►Simple example from the book:
  • 9. Instances of E-R diagram ►DB described by E-R will contain specific data (i.e. database instance) ►Each entity set will contain a particular finite set of entities ►Each entity contains a particular value for each attribute ►E-R data is not stored directly in DB
  • 10. E-R Relationships ► Suppose R is a relationship connecting entity sets E and F. Then:  If each member of E can be connected by R to at most one member of F, then we say that R is many- one from E to F. Note that in a many-one relationship from E to F, each entity in F can be connected to many members of E.  If R is both many-one from E to F and many-one from F to E, then we say that R is one-one. In a one-one relationship an entity of either entity set can be connected to at most one entity of the other set.  If R is neither many-one from E to F or from F to E, then we say R is many-many
  • 11. Multi-way relationships ► There is a relationship Sequel-of between the entity set Movies and itself. ► To differentiate the two movies in a relationship, one line is labeled by the role Original and one by the role Sequel, indicating the original movie and its sequel, respectively.
  • 12. Relationships Continued ►Some data models limit relationships to be binary ►It is possible to convert multi-way relationship into a collection of binary many- one relationships ►Need to introduce a connecting entity set, which will act as a bridge between smaller sets which come from splitting a larger multi-way relationship set. ►Connecting entity set might have its own attributes
  • 13. Design Principles ► Faithfulness:  Design has to comply strictly with specifications  Logical attributes and relationships ► Avoid redundancy ► "Everything should be made as simple as possible, but not simpler.” Albert Einstein ► Choose right relationships ► Select right elements  Many choices exist between using attributes and using entity set/relationship combinations  An attribute is simpler to implement than either entity set or a relationship
  • 14. Design Principals Cont. ►To replace an entity set by an attribute or attributes of several entity sets 3 conditions must be enforced:  All relationships in which entity set is involved must have arrows entering it. That is, it must be the “one” in many-one relationships, or its generalization for the case of multi-way relationships.  The attributes for E must collectively identify an entity. if there are several attributes, then no attribute must depend on the other attributes  No relationship involves E more than once