SlideShare a Scribd company logo
Dr. Amiya Ranjan Panda
Assistant Professor [II]
School of Computer Engineering,
Kalinga Institute of Industrial Technology (KIIT),
Deemed to be University,Odisha
Conversion of ER model to Relational Model
KALINGA INSTITUTE OF INDUSTRIAL
TECHNOLOGY
School Of Computer
Engineering
4 Credit Lecture Note 10
Chapter Contents
q Conversion of ER model to Relational Model
2
3
Conversion of ER model to Relational Model
A database that conforms to an ER diagram schema can be represented by a
collection of relational schemas. Both the ER model and Relational data model are
abstract, logical representations of real-world enterprises…
1. Representation of Strong Entity sets: A strong entity set reduces to a schema
with the same attributes. The primary key of the entity set serves as the primary
key of the resulting schema.
Loan = (loan_no, amount)
4
Conversion of ER model to Relational Model
2. Representation of Weak Entity sets: A weak entity set becomes a table that
includes a column for the primary key of the identifying strong entity set. The
primary key is constructed by the collection of foreign key and partial key.
Loan = (loan_no, amount)
Payment = (loan_no, payment_no, payment_date,
payment_amt)
5
Conversion of ER model to Relational Model
3. Representation of Relationship sets :
3. (a) Binary M:N: Union of the primary key attributes from the
participating entity sets becomes the primary key of the relationship.
Customer = (cid, cname, address) Loan = (loan_no, amount)
Borrow = (cid, loan_no)
If borrow_date is mentioned as descriptive attribute, then
Borrow = (cid, loan_no, borrow_date)
6
Conversion of ER model to Relational Model
3. Representation of Relationship sets :
3. (b) Binary M:1 / 1:M : Construct two tables, one for the entity set at 1
side and another for entity set at M side, add the descriptive attributes and
a reference of the primary key of 1 side to the entity set at M side.
Stud = (roll, name, branch) Library = (bid, bname, price,
roll)
The foreign key can be represented by specifying the name as:
Library = (bid, bname, price, borrowing_roll)
If borrow_date is the descriptive attribute, then
Library = (bid, bname, price, borrowing_roll, borrow_date)
7
Conversion of ER model to Relational Model
3. Representation of Relationship sets :
3. (c) Binary 1:1 : Construct two tables. In this case, either side can be
chosen to act as the many side. That is, extra attributes can be added to
either of the tables corresponding to the two entity sets, but not at the same
time.
Employee = (eid, ename, address, did) Department = (did, dname, location)
If it is required to mention the relationship name, then
Employee = (eid, ename, address, manager_did)
If department entity set will be considered as many side, then
Employee = (eid, ename, address) Department = (did, dname, location,
manager_eid)
8
Conversion of ER model to Relational Model
4. Representation of Recursive Relationship sets : Two tables will be
constructed; one for entity set and one for relationship set.
Employee = (eid, ename, address) Works_for = (mgrid, workerid)
This ER diagram can also be represented by using a single relation schema. In such
cases, the schema contains a foreign key for each tuple in the original entity set
Employee = (eid, ename, address, manager_id)
9
Conversion of ER model to Relational Model
5. Representation of Composite attributes : The composite attributes are
flattened out by creating a separate attribute for each of its parts.
Customer = (cid, name, address_street, address_city, address_pin)
10
Conversion of ER model to Relational Model
6. Representation of Multi-valued attributes: A multi-valued attribute M of an
entity set E is represented by a separate schema E_M as E_M (primary key of E,
M).
Employee = (eid, name, address) Employee_phone_no = (eid, phone_no)
11
Conversion of ER model to Relational Model
7. Representation of Generalization / Specialization : In case of
generalization/specialization-related ER diagram, one schema will be
constructed for the generalized entity set and the schemas for each of the
specialized entity sets.
Person = (person_id, name, address) Employee = (person_id, salary)
Customer = (person_id, credit_rating)
When the generalization/specialization is a disjointness case, the schemas are
constructed only for the specialized entity sets
Employee = (employee_id, name, address, salary) Customer =
(customer_id, name, address, credit_rating)
12
Conversion of ER model to Relational Model
8. Representation of Aggregation : To represent aggregation, create a schema
containing the primary key of the aggregated relationship, primary key of the
associated entity set and descriptive attributes (if any).
Employee = (eid, name, address) Branch = (bid, bname, asset)
Job = (jobid, position, responsibility) Works_on = (eid, bid, jobid) Manager = (mid,
mgrname)
Manages = (eid, bid, jobid, mid)
13

More Related Content

What's hot

ER model to Relational model mapping
ER model to Relational model mappingER model to Relational model mapping
ER model to Relational model mappingShubham Saini
 
Database Management System Introduction
Database Management System IntroductionDatabase Management System Introduction
Database Management System Introduction
Smriti Jain
 
Joins in dbms and types
Joins in dbms and typesJoins in dbms and types
Joins in dbms and types
university of Gujrat, pakistan
 
Degree of relationship set
Degree of relationship setDegree of relationship set
Degree of relationship set
Megha Sharma
 
Chapter-4 Enhanced ER Model
Chapter-4 Enhanced ER ModelChapter-4 Enhanced ER Model
Chapter-4 Enhanced ER Model
Kunal Anand
 
DBMS 1 | Introduction to DBMS
DBMS 1 | Introduction to DBMSDBMS 1 | Introduction to DBMS
DBMS 1 | Introduction to DBMS
Mohammad Imam Hossain
 
Database : Relational Data Model
Database : Relational Data ModelDatabase : Relational Data Model
Database : Relational Data Model
Smriti Jain
 
SQL(DDL & DML)
SQL(DDL & DML)SQL(DDL & DML)
SQL(DDL & DML)
Sharad Dubey
 
The Relational Database Model
The Relational Database ModelThe Relational Database Model
The Relational Database Model
Shishir Aryal
 
Er model ppt
Er model pptEr model ppt
Er model ppt
Pihu Goel
 
Types Of Keys in DBMS
Types Of Keys in DBMSTypes Of Keys in DBMS
Types Of Keys in DBMS
PadamNepal1
 
12. Indexing and Hashing in DBMS
12. Indexing and Hashing in DBMS12. Indexing and Hashing in DBMS
12. Indexing and Hashing in DBMSkoolkampus
 
Using the set operators
Using the set operatorsUsing the set operators
Using the set operators
Syed Zaid Irshad
 
1. Introduction to DBMS
1. Introduction to DBMS1. Introduction to DBMS
1. Introduction to DBMSkoolkampus
 
Database language
Database languageDatabase language
Chapter 4 Structured Query Language
Chapter 4 Structured Query LanguageChapter 4 Structured Query Language
Chapter 4 Structured Query Language
Eddyzulham Mahluzydde
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraints
madhav bansal
 
Transaction management DBMS
Transaction  management DBMSTransaction  management DBMS
Transaction management DBMS
Megha Patel
 
PL/SQL Introduction and Concepts
PL/SQL Introduction and Concepts PL/SQL Introduction and Concepts
PL/SQL Introduction and Concepts
Bharat Kalia
 

What's hot (20)

ER model to Relational model mapping
ER model to Relational model mappingER model to Relational model mapping
ER model to Relational model mapping
 
Database Management System Introduction
Database Management System IntroductionDatabase Management System Introduction
Database Management System Introduction
 
Joins in dbms and types
Joins in dbms and typesJoins in dbms and types
Joins in dbms and types
 
Degree of relationship set
Degree of relationship setDegree of relationship set
Degree of relationship set
 
Chapter-4 Enhanced ER Model
Chapter-4 Enhanced ER ModelChapter-4 Enhanced ER Model
Chapter-4 Enhanced ER Model
 
DBMS 1 | Introduction to DBMS
DBMS 1 | Introduction to DBMSDBMS 1 | Introduction to DBMS
DBMS 1 | Introduction to DBMS
 
Database : Relational Data Model
Database : Relational Data ModelDatabase : Relational Data Model
Database : Relational Data Model
 
SQL(DDL & DML)
SQL(DDL & DML)SQL(DDL & DML)
SQL(DDL & DML)
 
The Relational Database Model
The Relational Database ModelThe Relational Database Model
The Relational Database Model
 
Er model ppt
Er model pptEr model ppt
Er model ppt
 
Types Of Keys in DBMS
Types Of Keys in DBMSTypes Of Keys in DBMS
Types Of Keys in DBMS
 
12. Indexing and Hashing in DBMS
12. Indexing and Hashing in DBMS12. Indexing and Hashing in DBMS
12. Indexing and Hashing in DBMS
 
Using the set operators
Using the set operatorsUsing the set operators
Using the set operators
 
DBMS Keys
DBMS KeysDBMS Keys
DBMS Keys
 
1. Introduction to DBMS
1. Introduction to DBMS1. Introduction to DBMS
1. Introduction to DBMS
 
Database language
Database languageDatabase language
Database language
 
Chapter 4 Structured Query Language
Chapter 4 Structured Query LanguageChapter 4 Structured Query Language
Chapter 4 Structured Query Language
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraints
 
Transaction management DBMS
Transaction  management DBMSTransaction  management DBMS
Transaction management DBMS
 
PL/SQL Introduction and Concepts
PL/SQL Introduction and Concepts PL/SQL Introduction and Concepts
PL/SQL Introduction and Concepts
 

Similar to Dbms 10: Conversion of ER model to Relational Model

Unit 2 DBMS
Unit 2 DBMSUnit 2 DBMS
Unit 2 DBMS
DhivyaSubramaniyam
 
D I T211 Chapter 3
D I T211    Chapter 3D I T211    Chapter 3
D I T211 Chapter 3askme
 
Introduction to database-ER Model
Introduction to database-ER ModelIntroduction to database-ER Model
Introduction to database-ER Model
Ajit Nayak
 
Er & eer to relational mapping
Er & eer to relational mappingEr & eer to relational mapping
Er & eer to relational mappingsaurabhshertukde
 
DBMS - ER Model
DBMS - ER ModelDBMS - ER Model
DBMS - ER Model
MythiliMurugan3
 
Chapter-3 Data Modeling Using the Entity-Relationship Model
Chapter-3  Data Modeling Using the Entity-Relationship ModelChapter-3  Data Modeling Using the Entity-Relationship Model
Chapter-3 Data Modeling Using the Entity-Relationship Model
Raj vardhan
 
DBMS Part-2.pptx
DBMS Part-2.pptxDBMS Part-2.pptx
DBMS Part-2.pptx
Prof. Dr. K. Adisesha
 
RDBMS ER2 Relational
RDBMS ER2 RelationalRDBMS ER2 Relational
RDBMS ER2 RelationalSarmad Ali
 
Download different material from slide share
Download different material from slide shareDownload different material from slide share
Download different material from slide share
fanta teferi
 
Schema Integration, View Integration and Database Integration, ER Model & Dia...
Schema Integration, View Integration and Database Integration, ER Model & Dia...Schema Integration, View Integration and Database Integration, ER Model & Dia...
Schema Integration, View Integration and Database Integration, ER Model & Dia...
Mobarok Hossen
 
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
 
Fundamentals of database system - Data Modeling Using the Entity-Relationshi...
Fundamentals of database system  - Data Modeling Using the Entity-Relationshi...Fundamentals of database system  - Data Modeling Using the Entity-Relationshi...
Fundamentals of database system - Data Modeling Using the Entity-Relationshi...
Mustafa Kamel Mohammadi
 
Relational Model
Relational ModelRelational Model
Relational Model
A. S. M. Shafi
 
Eer >r.model
Eer >r.modelEer >r.model
Eer >r.modellavya3
 
Entity Relationship Modelling
Entity Relationship ModellingEntity Relationship Modelling
Entity Relationship Modelling
Bhandari Nawaraj
 
Chapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptxChapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptx
santosh96234
 
Conceptual Data Modelling Using ER-models
Conceptual Data Modelling Using ER-modelsConceptual Data Modelling Using ER-models
Conceptual Data Modelling Using ER-models
Shailaja Jayaprakash
 

Similar to Dbms 10: Conversion of ER model to Relational Model (20)

Unit 2 DBMS
Unit 2 DBMSUnit 2 DBMS
Unit 2 DBMS
 
L7 er2
L7 er2L7 er2
L7 er2
 
D I T211 Chapter 3
D I T211    Chapter 3D I T211    Chapter 3
D I T211 Chapter 3
 
Introduction to database-ER Model
Introduction to database-ER ModelIntroduction to database-ER Model
Introduction to database-ER Model
 
Er & eer to relational mapping
Er & eer to relational mappingEr & eer to relational mapping
Er & eer to relational mapping
 
Unit02 dbms
Unit02 dbmsUnit02 dbms
Unit02 dbms
 
DBMS - ER Model
DBMS - ER ModelDBMS - ER Model
DBMS - ER Model
 
Chapter-3 Data Modeling Using the Entity-Relationship Model
Chapter-3  Data Modeling Using the Entity-Relationship ModelChapter-3  Data Modeling Using the Entity-Relationship Model
Chapter-3 Data Modeling Using the Entity-Relationship Model
 
DBMS Part-2.pptx
DBMS Part-2.pptxDBMS Part-2.pptx
DBMS Part-2.pptx
 
RDBMS ER2 Relational
RDBMS ER2 RelationalRDBMS ER2 Relational
RDBMS ER2 Relational
 
Chapter7
Chapter7Chapter7
Chapter7
 
Download different material from slide share
Download different material from slide shareDownload different material from slide share
Download different material from slide share
 
Schema Integration, View Integration and Database Integration, ER Model & Dia...
Schema Integration, View Integration and Database Integration, ER Model & Dia...Schema Integration, View Integration and Database Integration, ER Model & Dia...
Schema Integration, View Integration and Database Integration, ER Model & Dia...
 
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
 
Fundamentals of database system - Data Modeling Using the Entity-Relationshi...
Fundamentals of database system  - Data Modeling Using the Entity-Relationshi...Fundamentals of database system  - Data Modeling Using the Entity-Relationshi...
Fundamentals of database system - Data Modeling Using the Entity-Relationshi...
 
Relational Model
Relational ModelRelational Model
Relational Model
 
Eer >r.model
Eer >r.modelEer >r.model
Eer >r.model
 
Entity Relationship Modelling
Entity Relationship ModellingEntity Relationship Modelling
Entity Relationship Modelling
 
Chapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptxChapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptx
 
Conceptual Data Modelling Using ER-models
Conceptual Data Modelling Using ER-modelsConceptual Data Modelling Using ER-models
Conceptual Data Modelling Using ER-models
 

More from Amiya9439793168

Dbms 14: Relational Calculus
Dbms 14: Relational CalculusDbms 14: Relational Calculus
Dbms 14: Relational Calculus
Amiya9439793168
 
Dbms 13: Query Using Relational Algebra
Dbms 13: Query Using Relational AlgebraDbms 13: Query Using Relational Algebra
Dbms 13: Query Using Relational Algebra
Amiya9439793168
 
Dbms 12: Join
Dbms 12: JoinDbms 12: Join
Dbms 12: Join
Amiya9439793168
 
Dbms 11: Relational Algebra
Dbms 11: Relational AlgebraDbms 11: Relational Algebra
Dbms 11: Relational Algebra
Amiya9439793168
 
Dbms 9: Relational Model
Dbms 9: Relational ModelDbms 9: Relational Model
Dbms 9: Relational Model
Amiya9439793168
 
Dbms 8: Enhanced ER Model
Dbms 8: Enhanced ER ModelDbms 8: Enhanced ER Model
Dbms 8: Enhanced ER Model
Amiya9439793168
 
Dbms 6: ER Modeling
Dbms 6: ER ModelingDbms 6: ER Modeling
Dbms 6: ER Modeling
Amiya9439793168
 
Dbms 3: 3 Schema Architecture
Dbms 3: 3 Schema ArchitectureDbms 3: 3 Schema Architecture
Dbms 3: 3 Schema Architecture
Amiya9439793168
 
Dbms 2: Data Model
Dbms 2: Data ModelDbms 2: Data Model
Dbms 2: Data Model
Amiya9439793168
 
Introduction to Database Management System
Introduction to Database Management SystemIntroduction to Database Management System
Introduction to Database Management System
Amiya9439793168
 
Dbms 7: ER Diagram Design Issue
Dbms 7: ER Diagram Design IssueDbms 7: ER Diagram Design Issue
Dbms 7: ER Diagram Design Issue
Amiya9439793168
 

More from Amiya9439793168 (11)

Dbms 14: Relational Calculus
Dbms 14: Relational CalculusDbms 14: Relational Calculus
Dbms 14: Relational Calculus
 
Dbms 13: Query Using Relational Algebra
Dbms 13: Query Using Relational AlgebraDbms 13: Query Using Relational Algebra
Dbms 13: Query Using Relational Algebra
 
Dbms 12: Join
Dbms 12: JoinDbms 12: Join
Dbms 12: Join
 
Dbms 11: Relational Algebra
Dbms 11: Relational AlgebraDbms 11: Relational Algebra
Dbms 11: Relational Algebra
 
Dbms 9: Relational Model
Dbms 9: Relational ModelDbms 9: Relational Model
Dbms 9: Relational Model
 
Dbms 8: Enhanced ER Model
Dbms 8: Enhanced ER ModelDbms 8: Enhanced ER Model
Dbms 8: Enhanced ER Model
 
Dbms 6: ER Modeling
Dbms 6: ER ModelingDbms 6: ER Modeling
Dbms 6: ER Modeling
 
Dbms 3: 3 Schema Architecture
Dbms 3: 3 Schema ArchitectureDbms 3: 3 Schema Architecture
Dbms 3: 3 Schema Architecture
 
Dbms 2: Data Model
Dbms 2: Data ModelDbms 2: Data Model
Dbms 2: Data Model
 
Introduction to Database Management System
Introduction to Database Management SystemIntroduction to Database Management System
Introduction to Database Management System
 
Dbms 7: ER Diagram Design Issue
Dbms 7: ER Diagram Design IssueDbms 7: ER Diagram Design Issue
Dbms 7: ER Diagram Design Issue
 

Recently uploaded

TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSETECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
DuvanRamosGarzon1
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
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
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
Kamal Acharya
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
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
 
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
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
MuhammadTufail242431
 
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
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
abh.arya
 
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
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
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
 

Recently uploaded (20)

TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSETECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
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
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
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
 
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
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
 
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...
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
 
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
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
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)
 

Dbms 10: Conversion of ER model to Relational Model

  • 1. Dr. Amiya Ranjan Panda Assistant Professor [II] School of Computer Engineering, Kalinga Institute of Industrial Technology (KIIT), Deemed to be University,Odisha Conversion of ER model to Relational Model KALINGA INSTITUTE OF INDUSTRIAL TECHNOLOGY School Of Computer Engineering 4 Credit Lecture Note 10
  • 2. Chapter Contents q Conversion of ER model to Relational Model 2
  • 3. 3 Conversion of ER model to Relational Model A database that conforms to an ER diagram schema can be represented by a collection of relational schemas. Both the ER model and Relational data model are abstract, logical representations of real-world enterprises… 1. Representation of Strong Entity sets: A strong entity set reduces to a schema with the same attributes. The primary key of the entity set serves as the primary key of the resulting schema. Loan = (loan_no, amount)
  • 4. 4 Conversion of ER model to Relational Model 2. Representation of Weak Entity sets: A weak entity set becomes a table that includes a column for the primary key of the identifying strong entity set. The primary key is constructed by the collection of foreign key and partial key. Loan = (loan_no, amount) Payment = (loan_no, payment_no, payment_date, payment_amt)
  • 5. 5 Conversion of ER model to Relational Model 3. Representation of Relationship sets : 3. (a) Binary M:N: Union of the primary key attributes from the participating entity sets becomes the primary key of the relationship. Customer = (cid, cname, address) Loan = (loan_no, amount) Borrow = (cid, loan_no) If borrow_date is mentioned as descriptive attribute, then Borrow = (cid, loan_no, borrow_date)
  • 6. 6 Conversion of ER model to Relational Model 3. Representation of Relationship sets : 3. (b) Binary M:1 / 1:M : Construct two tables, one for the entity set at 1 side and another for entity set at M side, add the descriptive attributes and a reference of the primary key of 1 side to the entity set at M side. Stud = (roll, name, branch) Library = (bid, bname, price, roll) The foreign key can be represented by specifying the name as: Library = (bid, bname, price, borrowing_roll) If borrow_date is the descriptive attribute, then Library = (bid, bname, price, borrowing_roll, borrow_date)
  • 7. 7 Conversion of ER model to Relational Model 3. Representation of Relationship sets : 3. (c) Binary 1:1 : Construct two tables. In this case, either side can be chosen to act as the many side. That is, extra attributes can be added to either of the tables corresponding to the two entity sets, but not at the same time. Employee = (eid, ename, address, did) Department = (did, dname, location) If it is required to mention the relationship name, then Employee = (eid, ename, address, manager_did) If department entity set will be considered as many side, then Employee = (eid, ename, address) Department = (did, dname, location, manager_eid)
  • 8. 8 Conversion of ER model to Relational Model 4. Representation of Recursive Relationship sets : Two tables will be constructed; one for entity set and one for relationship set. Employee = (eid, ename, address) Works_for = (mgrid, workerid) This ER diagram can also be represented by using a single relation schema. In such cases, the schema contains a foreign key for each tuple in the original entity set Employee = (eid, ename, address, manager_id)
  • 9. 9 Conversion of ER model to Relational Model 5. Representation of Composite attributes : The composite attributes are flattened out by creating a separate attribute for each of its parts. Customer = (cid, name, address_street, address_city, address_pin)
  • 10. 10 Conversion of ER model to Relational Model 6. Representation of Multi-valued attributes: A multi-valued attribute M of an entity set E is represented by a separate schema E_M as E_M (primary key of E, M). Employee = (eid, name, address) Employee_phone_no = (eid, phone_no)
  • 11. 11 Conversion of ER model to Relational Model 7. Representation of Generalization / Specialization : In case of generalization/specialization-related ER diagram, one schema will be constructed for the generalized entity set and the schemas for each of the specialized entity sets. Person = (person_id, name, address) Employee = (person_id, salary) Customer = (person_id, credit_rating) When the generalization/specialization is a disjointness case, the schemas are constructed only for the specialized entity sets Employee = (employee_id, name, address, salary) Customer = (customer_id, name, address, credit_rating)
  • 12. 12 Conversion of ER model to Relational Model 8. Representation of Aggregation : To represent aggregation, create a schema containing the primary key of the aggregated relationship, primary key of the associated entity set and descriptive attributes (if any). Employee = (eid, name, address) Branch = (bid, bname, asset) Job = (jobid, position, responsibility) Works_on = (eid, bid, jobid) Manager = (mid, mgrname) Manages = (eid, bid, jobid, mid)
  • 13. 13