SlideShare a Scribd company logo
1 of 24
Download to read offline
UNIT 1
Lecture 6
E R Model
Dinesh Kumar Bhawnani, BIT DURG
Relationship
• A relationship is an association among several entities.
• For example, we can define a relationship that associates customer
Hayes with loan L-15.
• This relationship specifies that Hayes is a customer with loan number
L-15.
Dinesh Kumar Bhawnani, BIT DURG
Hayes L-15
Relationship Set
• A relationship set is a set of relationships of the same type.
• Formally, it is a mathematical relation on n ≥ 2 (possibly non-distinct)
entity sets. If E1, E2, . . .,En are entity sets, then a relationship set R is
a subset of
{(e1, e2, . . . , en) | e1 ε E1, e2 ε E2, . . . , en ε En}
where (e1, e2, . . . , en) is a relationship.
• Consider the two entity sets customer and loan. We define the
relationship set borrower to denote the association between
customers and the bank loans that the customers have.
Dinesh Kumar Bhawnani, BIT DURG
Relationship Set (Borrower)
Dinesh Kumar Bhawnani, BIT DURG
Relationship Set (Borrower)
Dinesh Kumar Bhawnani, BIT DURG
Participation
• The association between entity sets is referred to as
participation; that is, the entity sets E1, E2, . . .,En
participate in relationship set R.
• The participation of an entity set E in a relationship
set R is said to be total if every entity in E participates
in at least one relationship in R.
• If only some entities in E participate in relationships in
R, the participation of entity set E in relationship R is
said to be partial.
Dinesh Kumar Bhawnani, BIT DURG
participation
Dinesh Kumar Bhawnani, BIT DURG
S1
S2
S3
S4
S5
S6
T1
T2
T3
T4
T5
STUDENT teaches TEACHER
participation
Dinesh Kumar Bhawnani, BIT DURG
STUDENT TEACHERteaches
partial total
Relationship Instance
• A relationship instance in an E-R schema represents an
association between the named entities in the real-world
enterprise that is being modeled.
• For. E.g., the individual customer entity Hayes, who has
customer identifier 677-89-9011, and the loan entity L-15
participate in a relationship instance of borrower.
• This relationship instance represents that, in the real-world
enterprise, the person called Hayes who holds customer-id
677-89-9011 has taken the loan that is numbered L-15.
Dinesh Kumar Bhawnani, BIT DURG
Descriptive Attribute
• A relationship may also have attributes called descriptive attributes.
• Consider a relationship set depositor with entity sets customer and
account. We could associate the attribute access-date to that
relationship to specify the most recent date on which a customer
accessed an account.
• The depositor relationship among the entities corresponding to
customer Jones and account A-217 has the value “23 May 2001” for
attribute access-date, which means that the most recent date that
Jones accessed account A-217 was 23 May 2001.
Dinesh Kumar Bhawnani, BIT DURG
Descriptive Attribute
Dinesh Kumar Bhawnani, BIT DURG
Degree
• The number of entity sets that participate in a
relationship set is called the degree of the relationship
set.
• A unary relationship set is of degree 1;
• A binary relationship set is of degree 2;
• A ternary relationship set is of degree 3.
Dinesh Kumar Bhawnani, BIT DURG
Unary Relationship (n = 1)
Dinesh Kumar Bhawnani, BIT DURG
Binary Relationship (n=2)
Dinesh Kumar Bhawnani, BIT DURG
Ternary Relationship (n=3)
Dinesh Kumar Bhawnani, BIT DURG
Role
• The function that an entity plays in a relationship is called that entity’s
role.
• Since entity sets participating in a relationship set are generally
distinct, roles are implicit and are not usually specified. However, they
are useful when the meaning of a relationship needs clarification.
Such is the case when the entity sets of a relationship set are not
distinct; that is, the same entity set participates in a relationship set
more than once, in different roles.
• In this type of relationship set, sometimes called a recursive
relationship set, explicit role names are necessary to specify how an
entity participates in a relationship instance.
Dinesh Kumar Bhawnani, BIT DURG
Unary Relationship (Recursive Relationship)
Dinesh Kumar Bhawnani, BIT DURG
Mapping Cardinalities (Cardinality Ratio)
• Mapping cardinalities, or cardinality ratios, express the number of
entities to which another entity can be associated via a relationship
set.
• Mapping cardinalities are most useful in describing binary
relationship sets, although they can contribute to the description of
relationship sets that involve more than two entity sets.
• For a binary relationship set R between entity sets A and B, the
mapping cardinality must be one of the following:
• One to one (1:1)
• One to many (1:M)
• Many to one (M:1)
• Many to many (M:N)
Dinesh Kumar Bhawnani, BIT DURG
One to one
• An entity in A is associated with at most one entity in B, and an entity in B is
associated with at most one entity in A.
Dinesh Kumar Bhawnani, BIT DURG
A BR
One to many
• An entity in A is associated with any number (zero or more) of entities in B. An
entity in B, however, can be associated with at most one entity in A.
Dinesh Kumar Bhawnani, BIT DURG
A BR
Many to one
• An entity in A is associated with at most one entity in B. An entity in B, however,
can be associated with any number (zero or more) of entities in A.
Dinesh Kumar Bhawnani, BIT DURG
A BR
Many to many
• An entity in A is associated with any number (zero or more) of entities in B, and
an entity in B is associated with any number (zero or more) of entities in A.
Dinesh Kumar Bhawnani, BIT DURG
A BR
University Questions
1. Write short notes on
a) Participation Constraints
b) Mapping Cardinality (Cardinality Ratio)
2. What is the degree of relationship? Explain recursive
relationship with example.
Dinesh Kumar Bhawnani, BIT DURG
For Video lecture on this topic please subscribe to my youtube channel.
The link for my youtube channel is
https://www.youtube.com/channel/UCRWGtE76JlTp1iim6aOTRuw?sub
_confirmation=1
Dinesh Kumar Bhawnani, BIT DURG

More Related Content

What's hot

2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMSkoolkampus
 
File systems versus a dbms
File systems versus a dbmsFile systems versus a dbms
File systems versus a dbmsRituBhargava7
 
Entity Relationship Diagrams
Entity Relationship DiagramsEntity Relationship Diagrams
Entity Relationship Diagramssadique_ghitm
 
Slide 6 er strong & weak entity
Slide 6 er  strong & weak entitySlide 6 er  strong & weak entity
Slide 6 er strong & weak entityVisakh V
 
Kubota f2880 front cut ride on mower service repair manual
Kubota f2880 front cut ride on mower service repair manualKubota f2880 front cut ride on mower service repair manual
Kubota f2880 front cut ride on mower service repair manualfjkskmmdmme
 
Pipeline processing and space time diagram
Pipeline processing and space time diagramPipeline processing and space time diagram
Pipeline processing and space time diagramRahul Sharma
 
Decoders
DecodersDecoders
DecodersRe Man
 
Ring Counter.pptx
Ring Counter.pptxRing Counter.pptx
Ring Counter.pptxhepzijustin
 
Digital Electronics - Counters
Digital Electronics - CountersDigital Electronics - Counters
Digital Electronics - CountersJayakrishnanJ11
 
Input Output Operations
Input Output OperationsInput Output Operations
Input Output Operationskdisthere
 

What's hot (20)

2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS
 
Attributes
AttributesAttributes
Attributes
 
Er diagrams presentation
Er diagrams presentationEr diagrams presentation
Er diagrams presentation
 
File systems versus a dbms
File systems versus a dbmsFile systems versus a dbms
File systems versus a dbms
 
Logic gates
Logic gatesLogic gates
Logic gates
 
Gray Code.pptx
Gray Code.pptxGray Code.pptx
Gray Code.pptx
 
Entity Relationship Diagrams
Entity Relationship DiagramsEntity Relationship Diagrams
Entity Relationship Diagrams
 
Slide 6 er strong & weak entity
Slide 6 er  strong & weak entitySlide 6 er  strong & weak entity
Slide 6 er strong & weak entity
 
Data warehousing
Data warehousingData warehousing
Data warehousing
 
Kubota f2880 front cut ride on mower service repair manual
Kubota f2880 front cut ride on mower service repair manualKubota f2880 front cut ride on mower service repair manual
Kubota f2880 front cut ride on mower service repair manual
 
itft-File design
itft-File designitft-File design
itft-File design
 
Pipeline processing and space time diagram
Pipeline processing and space time diagramPipeline processing and space time diagram
Pipeline processing and space time diagram
 
Decoders
DecodersDecoders
Decoders
 
DBMS UNIT1
DBMS UNIT1DBMS UNIT1
DBMS UNIT1
 
Ring Counter.pptx
Ring Counter.pptxRing Counter.pptx
Ring Counter.pptx
 
ER Model in DBMS
ER Model in DBMSER Model in DBMS
ER Model in DBMS
 
Digital Electronics - Counters
Digital Electronics - CountersDigital Electronics - Counters
Digital Electronics - Counters
 
Various types of accounts,rules regarding debit credit
Various types of accounts,rules regarding debit   creditVarious types of accounts,rules regarding debit   credit
Various types of accounts,rules regarding debit credit
 
Input Output Operations
Input Output OperationsInput Output Operations
Input Output Operations
 
Interrupt
InterruptInterrupt
Interrupt
 

Similar to Dbms Notes Lecture 6 : E R Model, Relationship, Cardinality Ratio

Database management system Lecture 7 : Strong and weak entity sets
Database management system Lecture 7 : Strong and weak entity setsDatabase management system Lecture 7 : Strong and weak entity sets
Database management system Lecture 7 : Strong and weak entity setsBIT Durg
 
Desigining of Database - ER Model
Desigining of Database - ER ModelDesigining of Database - ER Model
Desigining of Database - ER ModelAjay Chhimpa
 
Pertemuan-4------------------------------------------------
Pertemuan-4------------------------------------------------Pertemuan-4------------------------------------------------
Pertemuan-4------------------------------------------------keishaangelina2
 
ER Model and other topics in DBMS
ER Model and other topics in DBMSER Model and other topics in DBMS
ER Model and other topics in DBMSHarinarayananR2
 
Dbms Notes Lecture 5 : E R Model, Entity
Dbms Notes Lecture 5 : E R Model, EntityDbms Notes Lecture 5 : E R Model, Entity
Dbms Notes Lecture 5 : E R Model, EntityBIT Durg
 
Test presentation
Test presentationTest presentation
Test presentationnuvole
 
Er Model Nandha&Mani
Er Model Nandha&ManiEr Model Nandha&Mani
Er Model Nandha&Maniguest1e0229a
 
Chapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptxChapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptxsantosh96234
 
Conceptual Modeling of Data
Conceptual Modeling of DataConceptual Modeling of Data
Conceptual Modeling of DataM.Zalmai Rahmani
 

Similar to Dbms Notes Lecture 6 : E R Model, Relationship, Cardinality Ratio (20)

Database management system Lecture 7 : Strong and weak entity sets
Database management system Lecture 7 : Strong and weak entity setsDatabase management system Lecture 7 : Strong and weak entity sets
Database management system Lecture 7 : Strong and weak entity sets
 
Desigining of Database - ER Model
Desigining of Database - ER ModelDesigining of Database - ER Model
Desigining of Database - ER Model
 
Pertemuan-4------------------------------------------------
Pertemuan-4------------------------------------------------Pertemuan-4------------------------------------------------
Pertemuan-4------------------------------------------------
 
27 fcs157al3
27 fcs157al327 fcs157al3
27 fcs157al3
 
ER Model and other topics in DBMS
ER Model and other topics in DBMSER Model and other topics in DBMS
ER Model and other topics in DBMS
 
Dbms Notes Lecture 5 : E R Model, Entity
Dbms Notes Lecture 5 : E R Model, EntityDbms Notes Lecture 5 : E R Model, Entity
Dbms Notes Lecture 5 : E R Model, Entity
 
E R Model details.ppt
E R Model details.pptE R Model details.ppt
E R Model details.ppt
 
Test presentation
Test presentationTest presentation
Test presentation
 
Er model
Er modelEr model
Er model
 
10287 lecture5(2)
10287 lecture5(2)10287 lecture5(2)
10287 lecture5(2)
 
Er Model Nandha&Mani
Er Model Nandha&ManiEr Model Nandha&Mani
Er Model Nandha&Mani
 
Dbms ppt
Dbms pptDbms ppt
Dbms ppt
 
ER model
ER modelER model
ER model
 
Er model
Er modelEr model
Er model
 
dbms
dbmsdbms
dbms
 
Chapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptxChapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptx
 
Chapter2
Chapter2Chapter2
Chapter2
 
Chapter2
Chapter2Chapter2
Chapter2
 
Conceptual Modeling of Data
Conceptual Modeling of DataConceptual Modeling of Data
Conceptual Modeling of Data
 
database.pptx
database.pptxdatabase.pptx
database.pptx
 

More from BIT Durg

Dbms Notes Lecture 9 : Specialization, Generalization and Aggregation
Dbms Notes Lecture 9 : Specialization, Generalization and AggregationDbms Notes Lecture 9 : Specialization, Generalization and Aggregation
Dbms Notes Lecture 9 : Specialization, Generalization and AggregationBIT Durg
 
Dbms Notes Lecture 8 : E R Diagram question with solutions
Dbms Notes Lecture 8 : E R Diagram question with solutionsDbms Notes Lecture 8 : E R Diagram question with solutions
Dbms Notes Lecture 8 : E R Diagram question with solutionsBIT Durg
 
Dbms Notes Lecture 4 : Data Models in DBMS
Dbms Notes Lecture 4 : Data Models in DBMSDbms Notes Lecture 4 : Data Models in DBMS
Dbms Notes Lecture 4 : Data Models in DBMSBIT Durg
 
Dbms Notes Lecture 3 : Types of database users
Dbms Notes Lecture 3 : Types of database usersDbms Notes Lecture 3 : Types of database users
Dbms Notes Lecture 3 : Types of database usersBIT Durg
 
Dbms Notes Lecture 2 : Levels of Data Abstraction
Dbms Notes Lecture 2 : Levels of Data AbstractionDbms Notes Lecture 2 : Levels of Data Abstraction
Dbms Notes Lecture 2 : Levels of Data AbstractionBIT Durg
 
Dbms Notes Lecture 1 : Drawbacks of File processing system
Dbms Notes Lecture 1 : Drawbacks of File processing systemDbms Notes Lecture 1 : Drawbacks of File processing system
Dbms Notes Lecture 1 : Drawbacks of File processing systemBIT Durg
 

More from BIT Durg (6)

Dbms Notes Lecture 9 : Specialization, Generalization and Aggregation
Dbms Notes Lecture 9 : Specialization, Generalization and AggregationDbms Notes Lecture 9 : Specialization, Generalization and Aggregation
Dbms Notes Lecture 9 : Specialization, Generalization and Aggregation
 
Dbms Notes Lecture 8 : E R Diagram question with solutions
Dbms Notes Lecture 8 : E R Diagram question with solutionsDbms Notes Lecture 8 : E R Diagram question with solutions
Dbms Notes Lecture 8 : E R Diagram question with solutions
 
Dbms Notes Lecture 4 : Data Models in DBMS
Dbms Notes Lecture 4 : Data Models in DBMSDbms Notes Lecture 4 : Data Models in DBMS
Dbms Notes Lecture 4 : Data Models in DBMS
 
Dbms Notes Lecture 3 : Types of database users
Dbms Notes Lecture 3 : Types of database usersDbms Notes Lecture 3 : Types of database users
Dbms Notes Lecture 3 : Types of database users
 
Dbms Notes Lecture 2 : Levels of Data Abstraction
Dbms Notes Lecture 2 : Levels of Data AbstractionDbms Notes Lecture 2 : Levels of Data Abstraction
Dbms Notes Lecture 2 : Levels of Data Abstraction
 
Dbms Notes Lecture 1 : Drawbacks of File processing system
Dbms Notes Lecture 1 : Drawbacks of File processing systemDbms Notes Lecture 1 : Drawbacks of File processing system
Dbms Notes Lecture 1 : Drawbacks of File processing system
 

Recently uploaded

Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 

Recently uploaded (20)

Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 

Dbms Notes Lecture 6 : E R Model, Relationship, Cardinality Ratio

  • 1. UNIT 1 Lecture 6 E R Model Dinesh Kumar Bhawnani, BIT DURG
  • 2. Relationship • A relationship is an association among several entities. • For example, we can define a relationship that associates customer Hayes with loan L-15. • This relationship specifies that Hayes is a customer with loan number L-15. Dinesh Kumar Bhawnani, BIT DURG Hayes L-15
  • 3. Relationship Set • A relationship set is a set of relationships of the same type. • Formally, it is a mathematical relation on n ≥ 2 (possibly non-distinct) entity sets. If E1, E2, . . .,En are entity sets, then a relationship set R is a subset of {(e1, e2, . . . , en) | e1 ε E1, e2 ε E2, . . . , en ε En} where (e1, e2, . . . , en) is a relationship. • Consider the two entity sets customer and loan. We define the relationship set borrower to denote the association between customers and the bank loans that the customers have. Dinesh Kumar Bhawnani, BIT DURG
  • 4. Relationship Set (Borrower) Dinesh Kumar Bhawnani, BIT DURG
  • 5. Relationship Set (Borrower) Dinesh Kumar Bhawnani, BIT DURG
  • 6. Participation • The association between entity sets is referred to as participation; that is, the entity sets E1, E2, . . .,En participate in relationship set R. • The participation of an entity set E in a relationship set R is said to be total if every entity in E participates in at least one relationship in R. • If only some entities in E participate in relationships in R, the participation of entity set E in relationship R is said to be partial. Dinesh Kumar Bhawnani, BIT DURG
  • 7. participation Dinesh Kumar Bhawnani, BIT DURG S1 S2 S3 S4 S5 S6 T1 T2 T3 T4 T5 STUDENT teaches TEACHER
  • 8. participation Dinesh Kumar Bhawnani, BIT DURG STUDENT TEACHERteaches partial total
  • 9. Relationship Instance • A relationship instance in an E-R schema represents an association between the named entities in the real-world enterprise that is being modeled. • For. E.g., the individual customer entity Hayes, who has customer identifier 677-89-9011, and the loan entity L-15 participate in a relationship instance of borrower. • This relationship instance represents that, in the real-world enterprise, the person called Hayes who holds customer-id 677-89-9011 has taken the loan that is numbered L-15. Dinesh Kumar Bhawnani, BIT DURG
  • 10. Descriptive Attribute • A relationship may also have attributes called descriptive attributes. • Consider a relationship set depositor with entity sets customer and account. We could associate the attribute access-date to that relationship to specify the most recent date on which a customer accessed an account. • The depositor relationship among the entities corresponding to customer Jones and account A-217 has the value “23 May 2001” for attribute access-date, which means that the most recent date that Jones accessed account A-217 was 23 May 2001. Dinesh Kumar Bhawnani, BIT DURG
  • 12. Degree • The number of entity sets that participate in a relationship set is called the degree of the relationship set. • A unary relationship set is of degree 1; • A binary relationship set is of degree 2; • A ternary relationship set is of degree 3. Dinesh Kumar Bhawnani, BIT DURG
  • 13. Unary Relationship (n = 1) Dinesh Kumar Bhawnani, BIT DURG
  • 14. Binary Relationship (n=2) Dinesh Kumar Bhawnani, BIT DURG
  • 15. Ternary Relationship (n=3) Dinesh Kumar Bhawnani, BIT DURG
  • 16. Role • The function that an entity plays in a relationship is called that entity’s role. • Since entity sets participating in a relationship set are generally distinct, roles are implicit and are not usually specified. However, they are useful when the meaning of a relationship needs clarification. Such is the case when the entity sets of a relationship set are not distinct; that is, the same entity set participates in a relationship set more than once, in different roles. • In this type of relationship set, sometimes called a recursive relationship set, explicit role names are necessary to specify how an entity participates in a relationship instance. Dinesh Kumar Bhawnani, BIT DURG
  • 17. Unary Relationship (Recursive Relationship) Dinesh Kumar Bhawnani, BIT DURG
  • 18. Mapping Cardinalities (Cardinality Ratio) • Mapping cardinalities, or cardinality ratios, express the number of entities to which another entity can be associated via a relationship set. • Mapping cardinalities are most useful in describing binary relationship sets, although they can contribute to the description of relationship sets that involve more than two entity sets. • For a binary relationship set R between entity sets A and B, the mapping cardinality must be one of the following: • One to one (1:1) • One to many (1:M) • Many to one (M:1) • Many to many (M:N) Dinesh Kumar Bhawnani, BIT DURG
  • 19. One to one • An entity in A is associated with at most one entity in B, and an entity in B is associated with at most one entity in A. Dinesh Kumar Bhawnani, BIT DURG A BR
  • 20. One to many • An entity in A is associated with any number (zero or more) of entities in B. An entity in B, however, can be associated with at most one entity in A. Dinesh Kumar Bhawnani, BIT DURG A BR
  • 21. Many to one • An entity in A is associated with at most one entity in B. An entity in B, however, can be associated with any number (zero or more) of entities in A. Dinesh Kumar Bhawnani, BIT DURG A BR
  • 22. Many to many • An entity in A is associated with any number (zero or more) of entities in B, and an entity in B is associated with any number (zero or more) of entities in A. Dinesh Kumar Bhawnani, BIT DURG A BR
  • 23. University Questions 1. Write short notes on a) Participation Constraints b) Mapping Cardinality (Cardinality Ratio) 2. What is the degree of relationship? Explain recursive relationship with example. Dinesh Kumar Bhawnani, BIT DURG
  • 24. For Video lecture on this topic please subscribe to my youtube channel. The link for my youtube channel is https://www.youtube.com/channel/UCRWGtE76JlTp1iim6aOTRuw?sub _confirmation=1 Dinesh Kumar Bhawnani, BIT DURG