SlideShare a Scribd company logo
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

[마케팅전략] 2012년 게임어플리케이션 마케팅 전략 및 실행안
[마케팅전략] 2012년 게임어플리케이션 마케팅 전략 및 실행안[마케팅전략] 2012년 게임어플리케이션 마케팅 전략 및 실행안
[마케팅전략] 2012년 게임어플리케이션 마케팅 전략 및 실행안
Lee Sung Hoon
 
Sap fscm configuration guide sample pages
Sap fscm configuration guide sample pagesSap fscm configuration guide sample pages
Sap fscm configuration guide sample pages
Shanker SG
 
What is cloud backup?
What is cloud backup?What is cloud backup?
What is cloud backup?
Asigra
 
Consignment Process
Consignment ProcessConsignment Process
Consignment Process
Viany Adriana
 
Order to cash flow cycle in order management
Order to cash flow cycle in order managementOrder to cash flow cycle in order management
Order to cash flow cycle in order management
venkatesh gurusamy
 
MTO Planning Strategies .pdf
MTO Planning Strategies .pdfMTO Planning Strategies .pdf
MTO Planning Strategies .pdf
RavindraSutar9
 

What's hot (6)

[마케팅전략] 2012년 게임어플리케이션 마케팅 전략 및 실행안
[마케팅전략] 2012년 게임어플리케이션 마케팅 전략 및 실행안[마케팅전략] 2012년 게임어플리케이션 마케팅 전략 및 실행안
[마케팅전략] 2012년 게임어플리케이션 마케팅 전략 및 실행안
 
Sap fscm configuration guide sample pages
Sap fscm configuration guide sample pagesSap fscm configuration guide sample pages
Sap fscm configuration guide sample pages
 
What is cloud backup?
What is cloud backup?What is cloud backup?
What is cloud backup?
 
Consignment Process
Consignment ProcessConsignment Process
Consignment Process
 
Order to cash flow cycle in order management
Order to cash flow cycle in order managementOrder to cash flow cycle in order management
Order to cash flow cycle in order management
 
MTO Planning Strategies .pdf
MTO Planning Strategies .pdfMTO Planning Strategies .pdf
MTO Planning Strategies .pdf
 

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 sets
BIT Durg
 
Desigining of Database - ER Model
Desigining of Database - ER ModelDesigining of Database - ER Model
Desigining of Database - ER Model
Ajay Chhimpa
 
Pertemuan-4------------------------------------------------
Pertemuan-4------------------------------------------------Pertemuan-4------------------------------------------------
Pertemuan-4------------------------------------------------
keishaangelina2
 
The Entity-Relationship Model(ER Diagram).pptx
The Entity-Relationship Model(ER Diagram).pptxThe Entity-Relationship Model(ER Diagram).pptx
The Entity-Relationship Model(ER Diagram).pptx
MANASINANDKISHORDEOR
 
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
HarinarayananR2
 
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
BIT Durg
 
E R Model details.ppt
E R Model details.pptE R Model details.ppt
E R Model details.ppt
ShivareddyGangam
 
Test presentation
Test presentationTest presentation
Test presentation
nuvole
 
2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMSkoolkampus
 
Er model
Er modelEr model
Er model
gagan bhattarai
 
Er Model Nandha&Mani
Er Model Nandha&ManiEr Model Nandha&Mani
Er Model Nandha&Maniguest1e0229a
 
Dbms ppt
Dbms pptDbms ppt
Dbms ppt
anshul rathore
 
ER model
ER modelER model
ER model
paddu123
 
Er model
Er modelEr model
Er model
paddu123
 
Chapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptxChapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptx
santosh96234
 

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
 
The Entity-Relationship Model(ER Diagram).pptx
The Entity-Relationship Model(ER Diagram).pptxThe Entity-Relationship Model(ER Diagram).pptx
The Entity-Relationship Model(ER Diagram).pptx
 
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
 
2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS
 
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
 
dbms
dbmsdbms
dbms
 
ER model
ER modelER model
ER model
 
Er model
Er modelEr model
Er model
 
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
 

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 Aggregation
BIT 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 solutions
BIT 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 DBMS
BIT 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 users
BIT 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 Abstraction
BIT 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 system
BIT 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

1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Po-Chuan Chen
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 

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