SlideShare a Scribd company logo
REDUCTION TO
RELATIONAL SCHEMAS
Summary of Symbols used in ER
Notation
Contd..
Contd..
ER Diagram Design Issues
• Use of Entity Sets v/s Attributes
• Use of Entity Sets v/s Relationship Sets
• Binary v/s n-ary relationships
• Placement of Relationship Attributes
Use of Entity Sets v/s Attributes
Use of Entity Sets v/s Relationship
Sets
(a)
(b)
One possible guideline in determining
whether to use an entity set or a
relationship set is to designate a
relationship set to describe an action
that occurs between entities.
Binary v/s n-ary relationships
Ternary relationship versus three binary
relationships
Placement of Relationship
Attributes
• The design decision of where to place descriptive
attributes for a relationship or for an entity should
reflect the characteristics of the enterprise being
modeled.
ER
Diagram
for
a
University
Enterprise
Reduction to Relational Schemas
Introduction
• A conceptual ER model can be reduced to relation
schemas because the two models employ similar design
principles.
• The quality of the resulting set of relation schemas
depends on the quality of the original ER diagram.
• Entity sets and relationship sets can be expressed
uniformly as relation schemas with the name of the
corresponding entity set or relationship set.
• Each schema has a number of columns (attributes),
which have unique names.
Example
Entity Set Relational Schema
Employees
ssn
name
lot
Employees(ssn, name, lot)
Create table Employees (
ssn number(5),
name varchar (10),
lot number(5),
primary key(ssn));
Example
Representation of Strong Entity
Sets with Simple Attributes
• A strong entity set reduces to a schema with the
same attributes
• Example: course(course_id, title, credits)
• For schemas derived from strong entity sets, the
primary key of the entity set serves as the primary
key of the resulting schema.
Representation of Strong Entity
Sets with Complex Attributes
• Complex Attributes – Composite, Multi-valued and
Derived Attributes.
• Represent composite attributes by creating a
separate attribute for each of the component
attributes(sub-parts).
• Represent multi-valued attributes itself as a separate
schema.
• Derived attributes are not explicitly represented in
relational model.
Representation of Composite
Attributes
Representation of Multivalued Attributes
Example
Instructor
(ID, first_name, middle_initial,
last_name, street_number,
street_name, apt_number, city, state,
zip_code, date_of_birth)
Representation of Weak Entity Sets
• For schemas derived from a weak entity set, the
combination of the primary key of the strong entity
set and the discriminator of the weak entity set
serves as the primary key of the schema.
• Example : section ( course_id, sec_id, sem, year )
Representation of Relationship Sets
• Binary many-to-many relationship set is represented
as a schema with the union of primary keys of the
two participating entity sets.
• Example: schema for relationship set advisor
advisor = (s_id, i_id)
Contd..
• Binary one-to-one relationship set is represented as a
schema with the primary key of any one of the two
participating entity sets.
• Binary many-to-one or one-to-many relationship set
is represented as a schema with primary key of the
entity set on the “many” side.
Contd..
• N-ary relationship set:
 Without any arrows: represented as a schema
with union of primary key attributes.
 With arrows on one side: represented as a schema
with primary key of the entity set not on the
“arrow” side.
For one-to-one relationship without total
participation
For one-to-one relationship with one entity
set having total participation
For one-to-many/many-to-one relationship with
one entity set having total participation on “many”
side
For many-to-many relationship
Redundancy of Schemas
• The schema corresponding to a relationship set
linking a weak entity set to its identifying entity set
is redundant.
• In the example E-R diagram, the weak entity set
section is dependent on the strong entity set course
via the relationship set sec course.
Contd..
• The primary key of section is {course id, sec id, semester,
year} and the primary key of course is course id.
• Since sec_course has no descriptive attributes, the
sec_course schema has attributes {course id, sec id,
semester, year} as the primary key
• Thus, the sec_course schema is redundant.
{course id, sec id, semester, year}
{course id, title, credits}
{course id, sec id, semester, year}
Combination of Schemas
• Consider a many-to-one relationship set AB from
entity set A to entity set B.
• Resulting schemas: A, B, and AB
• If the participation of A in the relationship is total;
i.e., every entity A in the entity set B must
participate in the relationship AB, then
– Combine the schemas A and AB to form a single
schema consisting of the union of attributes of
both schemas.
• The primary key of the combined schema is the
primary key of the entity set into whose schema the
relationship set schema was merged.
Contd..
• Many-to-one and one-to-many relationship sets that are total
on the many-side can be represented by adding an extra
attribute to the “many” side, containing the primary key of
the “one” side
• Example: Instead of creating a schema for relationship set
inst_dept, add an attribute dept_name to the schema arising
from entity set instructor
MIND MAP
• ER Diagram Design Issues
– Use of Entity Sets v/s Attributes
– Use of Entity Sets v/s Relationship Sets
– Binary v/s n-ary relationships
– Placement of Relationship Attributes
REDUCTION TO RELATIONAL SCHEMA
• Representation of Strong Entity Sets with simple
attributes
• Representation of Strong Entity Sets with complex
attributes
o Composite attributes
o Multi-valued attributes
o Derived attributes
• Representation of Weak Entity Sets
• Representation of Relationship Sets
o Redundancy of Schemas
o Combination of Schemas
Summary

More Related Content

Similar to 19IS305_U1_LP3_LM3-22-23-2.pdf

Dbs4
Dbs4Dbs4
Database Design and Entity relationship Model.pptx
Database Design and Entity relationship Model.pptxDatabase Design and Entity relationship Model.pptx
Database Design and Entity relationship Model.pptx
yamuna67903
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship ModelSlideshare
 
Data & Databases
Data & Databases Data & Databases
Data & Databases
Tharindu Weerasinghe
 
Revision ch 3
Revision ch 3Revision ch 3
Revision ch 3
Rupali Rana
 
Er diagrams
Er diagramsEr diagrams
Er diagrams
VisnuDharsini
 
Entityrelationshipmodel
EntityrelationshipmodelEntityrelationshipmodel
Entityrelationshipmodel
Enes Bolfidan
 
DATA MODEL PRESENTATION UNIT I-BCA I.pptx
DATA MODEL PRESENTATION UNIT I-BCA I.pptxDATA MODEL PRESENTATION UNIT I-BCA I.pptx
DATA MODEL PRESENTATION UNIT I-BCA I.pptx
JasmineMichael1
 
entity-relationship-diagram-chen-&-crow -model.ppt
entity-relationship-diagram-chen-&-crow -model.pptentity-relationship-diagram-chen-&-crow -model.ppt
entity-relationship-diagram-chen-&-crow -model.ppt
IRWANBINISMAILKPMGur1
 
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
 
Unit i b(er model)
Unit i b(er model)Unit i b(er model)
Unit i b(er model)
Rohit Rathi
 
L attribute in compiler design
L  attribute in compiler designL  attribute in compiler design
L attribute in compiler design
khush_boo31
 
Unit 3 final.pptx
Unit 3 final.pptxUnit 3 final.pptx
Unit 3 final.pptx
MaximusAranha
 
7.relational model
7.relational model7.relational model
7.relational model
raghuinfo
 
ERModel1.pdf
ERModel1.pdfERModel1.pdf
ERModel1.pdf
MirHazarKhan1
 
Presentation of saad on e-r diagram.
Presentation of saad on e-r diagram.Presentation of saad on e-r diagram.
Presentation of saad on e-r diagram.
sumit gyawali
 
ER model
ER modelER model
ER model
ShilpaDe
 
ER model
ER modelER model
ER model
paddu123
 

Similar to 19IS305_U1_LP3_LM3-22-23-2.pdf (20)

Dbs4
Dbs4Dbs4
Dbs4
 
Database Design and Entity relationship Model.pptx
Database Design and Entity relationship Model.pptxDatabase Design and Entity relationship Model.pptx
Database Design and Entity relationship Model.pptx
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship Model
 
Data & Databases
Data & Databases Data & Databases
Data & Databases
 
Revision ch 3
Revision ch 3Revision ch 3
Revision ch 3
 
Er diagrams
Er diagramsEr diagrams
Er diagrams
 
Entityrelationshipmodel
EntityrelationshipmodelEntityrelationshipmodel
Entityrelationshipmodel
 
DATA MODEL PRESENTATION UNIT I-BCA I.pptx
DATA MODEL PRESENTATION UNIT I-BCA I.pptxDATA MODEL PRESENTATION UNIT I-BCA I.pptx
DATA MODEL PRESENTATION UNIT I-BCA I.pptx
 
entity-relationship-diagram-chen-&-crow -model.ppt
entity-relationship-diagram-chen-&-crow -model.pptentity-relationship-diagram-chen-&-crow -model.ppt
entity-relationship-diagram-chen-&-crow -model.ppt
 
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
 
Unit i b(er model)
Unit i b(er model)Unit i b(er model)
Unit i b(er model)
 
L attribute in compiler design
L  attribute in compiler designL  attribute in compiler design
L attribute in compiler design
 
Unit 3 final.pptx
Unit 3 final.pptxUnit 3 final.pptx
Unit 3 final.pptx
 
7.relational model
7.relational model7.relational model
7.relational model
 
RDBMS ERD
RDBMS ERDRDBMS ERD
RDBMS ERD
 
ERModel1.pdf
ERModel1.pdfERModel1.pdf
ERModel1.pdf
 
Presentation of saad on e-r diagram.
Presentation of saad on e-r diagram.Presentation of saad on e-r diagram.
Presentation of saad on e-r diagram.
 
ER model
ER modelER model
ER model
 
dbms
dbmsdbms
dbms
 
ER model
ER modelER model
ER model
 

More from GOWTHAMR721887

19IS402_LP3.1_LM_22-23.pdf
19IS402_LP3.1_LM_22-23.pdf19IS402_LP3.1_LM_22-23.pdf
19IS402_LP3.1_LM_22-23.pdf
GOWTHAMR721887
 
19IS402_LP1_LM_22-23.pdf
19IS402_LP1_LM_22-23.pdf19IS402_LP1_LM_22-23.pdf
19IS402_LP1_LM_22-23.pdf
GOWTHAMR721887
 
22PH102_ISE_U3_LP1_-_Notes.pdf
22PH102_ISE_U3_LP1_-_Notes.pdf22PH102_ISE_U3_LP1_-_Notes.pdf
22PH102_ISE_U3_LP1_-_Notes.pdf
GOWTHAMR721887
 
22PH102_ISE_U2_LP1_-_Notes.pdf
22PH102_ISE_U2_LP1_-_Notes.pdf22PH102_ISE_U2_LP1_-_Notes.pdf
22PH102_ISE_U2_LP1_-_Notes.pdf
GOWTHAMR721887
 
19IS303_22-23_LM11.pdf
19IS303_22-23_LM11.pdf19IS303_22-23_LM11.pdf
19IS303_22-23_LM11.pdf
GOWTHAMR721887
 
19IS305_U2_LP4_LM4-22-23.pdf
19IS305_U2_LP4_LM4-22-23.pdf19IS305_U2_LP4_LM4-22-23.pdf
19IS305_U2_LP4_LM4-22-23.pdf
GOWTHAMR721887
 
An Internet of Things Based Smart Waste.pptx
An Internet of Things Based Smart Waste.pptxAn Internet of Things Based Smart Waste.pptx
An Internet of Things Based Smart Waste.pptx
GOWTHAMR721887
 

More from GOWTHAMR721887 (7)

19IS402_LP3.1_LM_22-23.pdf
19IS402_LP3.1_LM_22-23.pdf19IS402_LP3.1_LM_22-23.pdf
19IS402_LP3.1_LM_22-23.pdf
 
19IS402_LP1_LM_22-23.pdf
19IS402_LP1_LM_22-23.pdf19IS402_LP1_LM_22-23.pdf
19IS402_LP1_LM_22-23.pdf
 
22PH102_ISE_U3_LP1_-_Notes.pdf
22PH102_ISE_U3_LP1_-_Notes.pdf22PH102_ISE_U3_LP1_-_Notes.pdf
22PH102_ISE_U3_LP1_-_Notes.pdf
 
22PH102_ISE_U2_LP1_-_Notes.pdf
22PH102_ISE_U2_LP1_-_Notes.pdf22PH102_ISE_U2_LP1_-_Notes.pdf
22PH102_ISE_U2_LP1_-_Notes.pdf
 
19IS303_22-23_LM11.pdf
19IS303_22-23_LM11.pdf19IS303_22-23_LM11.pdf
19IS303_22-23_LM11.pdf
 
19IS305_U2_LP4_LM4-22-23.pdf
19IS305_U2_LP4_LM4-22-23.pdf19IS305_U2_LP4_LM4-22-23.pdf
19IS305_U2_LP4_LM4-22-23.pdf
 
An Internet of Things Based Smart Waste.pptx
An Internet of Things Based Smart Waste.pptxAn Internet of Things Based Smart Waste.pptx
An Internet of Things Based Smart Waste.pptx
 

Recently uploaded

Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
AhmedHussein950959
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
manasideore6
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 

Recently uploaded (20)

Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 

19IS305_U1_LP3_LM3-22-23-2.pdf

  • 2. Summary of Symbols used in ER Notation
  • 5. ER Diagram Design Issues • Use of Entity Sets v/s Attributes • Use of Entity Sets v/s Relationship Sets • Binary v/s n-ary relationships • Placement of Relationship Attributes
  • 6. Use of Entity Sets v/s Attributes
  • 7. Use of Entity Sets v/s Relationship Sets (a) (b) One possible guideline in determining whether to use an entity set or a relationship set is to designate a relationship set to describe an action that occurs between entities.
  • 8. Binary v/s n-ary relationships Ternary relationship versus three binary relationships
  • 9. Placement of Relationship Attributes • The design decision of where to place descriptive attributes for a relationship or for an entity should reflect the characteristics of the enterprise being modeled.
  • 10.
  • 13. Introduction • A conceptual ER model can be reduced to relation schemas because the two models employ similar design principles. • The quality of the resulting set of relation schemas depends on the quality of the original ER diagram. • Entity sets and relationship sets can be expressed uniformly as relation schemas with the name of the corresponding entity set or relationship set. • Each schema has a number of columns (attributes), which have unique names.
  • 14. Example Entity Set Relational Schema Employees ssn name lot Employees(ssn, name, lot) Create table Employees ( ssn number(5), name varchar (10), lot number(5), primary key(ssn));
  • 16. Representation of Strong Entity Sets with Simple Attributes • A strong entity set reduces to a schema with the same attributes • Example: course(course_id, title, credits) • For schemas derived from strong entity sets, the primary key of the entity set serves as the primary key of the resulting schema.
  • 17.
  • 18. Representation of Strong Entity Sets with Complex Attributes • Complex Attributes – Composite, Multi-valued and Derived Attributes. • Represent composite attributes by creating a separate attribute for each of the component attributes(sub-parts). • Represent multi-valued attributes itself as a separate schema. • Derived attributes are not explicitly represented in relational model.
  • 21. Example Instructor (ID, first_name, middle_initial, last_name, street_number, street_name, apt_number, city, state, zip_code, date_of_birth)
  • 22. Representation of Weak Entity Sets • For schemas derived from a weak entity set, the combination of the primary key of the strong entity set and the discriminator of the weak entity set serves as the primary key of the schema. • Example : section ( course_id, sec_id, sem, year )
  • 23.
  • 24. Representation of Relationship Sets • Binary many-to-many relationship set is represented as a schema with the union of primary keys of the two participating entity sets. • Example: schema for relationship set advisor advisor = (s_id, i_id)
  • 25. Contd.. • Binary one-to-one relationship set is represented as a schema with the primary key of any one of the two participating entity sets. • Binary many-to-one or one-to-many relationship set is represented as a schema with primary key of the entity set on the “many” side.
  • 26. Contd.. • N-ary relationship set:  Without any arrows: represented as a schema with union of primary key attributes.  With arrows on one side: represented as a schema with primary key of the entity set not on the “arrow” side.
  • 27. For one-to-one relationship without total participation
  • 28. For one-to-one relationship with one entity set having total participation
  • 29. For one-to-many/many-to-one relationship with one entity set having total participation on “many” side
  • 31. Redundancy of Schemas • The schema corresponding to a relationship set linking a weak entity set to its identifying entity set is redundant. • In the example E-R diagram, the weak entity set section is dependent on the strong entity set course via the relationship set sec course.
  • 32. Contd.. • The primary key of section is {course id, sec id, semester, year} and the primary key of course is course id. • Since sec_course has no descriptive attributes, the sec_course schema has attributes {course id, sec id, semester, year} as the primary key • Thus, the sec_course schema is redundant. {course id, sec id, semester, year} {course id, title, credits} {course id, sec id, semester, year}
  • 33. Combination of Schemas • Consider a many-to-one relationship set AB from entity set A to entity set B. • Resulting schemas: A, B, and AB • If the participation of A in the relationship is total; i.e., every entity A in the entity set B must participate in the relationship AB, then – Combine the schemas A and AB to form a single schema consisting of the union of attributes of both schemas. • The primary key of the combined schema is the primary key of the entity set into whose schema the relationship set schema was merged.
  • 34. Contd.. • Many-to-one and one-to-many relationship sets that are total on the many-side can be represented by adding an extra attribute to the “many” side, containing the primary key of the “one” side • Example: Instead of creating a schema for relationship set inst_dept, add an attribute dept_name to the schema arising from entity set instructor
  • 36. • ER Diagram Design Issues – Use of Entity Sets v/s Attributes – Use of Entity Sets v/s Relationship Sets – Binary v/s n-ary relationships – Placement of Relationship Attributes REDUCTION TO RELATIONAL SCHEMA • Representation of Strong Entity Sets with simple attributes • Representation of Strong Entity Sets with complex attributes o Composite attributes o Multi-valued attributes o Derived attributes • Representation of Weak Entity Sets • Representation of Relationship Sets o Redundancy of Schemas o Combination of Schemas Summary