SlideShare a Scribd company logo
1 of 50
Logical Database Design  and the Relational Model Modern Database Management Jeffrey A. Hoffer, Mary B. Prescott, Fred R. McFadden
Relation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Correspondence with ER Model ,[object Object],[object Object],[object Object],[object Object]
Key Fields ,[object Object],[object Object],[object Object],[object Object],[object Object]
Figure 5-3 -- Schema for four relations (Pine Valley Furniture) Primary Key Foreign Key  (implements 1:N relationship between customer and order) Combined, these are a  composite primary key  (uniquely identifies the order line)…individually they are  foreign keys  (implement M:N relationship between order and product)
Integrity Constraints ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Integrity Constraints ,[object Object],[object Object],[object Object],[object Object],[object Object]
Figure 5-5:  Referential integrity constraints (Pine Valley Furniture) Referential integrity constraints are drawn via arrows from dependent to parent table
Transforming EER Diagrams into Relations ,[object Object],[object Object],[object Object],[object Object]
(a) CUSTOMER entity type with simple attributes Figure 5-8: Mapping a regular entity (b) CUSTOMER relation
(a) CUSTOMER entity type with composite attribute Figure 5-9: Mapping a composite attribute (b) CUSTOMER relation with address detail
Figure 5-10: Mapping a multivalued attribute 1 – to – many relationship between original entity and new relation (a) Multivalued attribute becomes a separate relation with foreign key (b)
Transforming EER Diagrams into Relations ,[object Object],[object Object],[object Object],[object Object],[object Object]
Figure 5-11: Example of mapping a weak entity (a) Weak entity DEPENDENT
Figure 5-11(b) Relations resulting from weak entity NOTE: the domain constraint for the foreign key should NOT allow  null  value if DEPENDENT is a weak entity Foreign key Composite primary key
Transforming EER Diagrams into Relations ,[object Object],[object Object],[object Object],[object Object]
Figure 5-12: Example of mapping a 1:M relationship (a) Relationship between customers and orders Note the mandatory one
Figure 5-12(b) Mapping the relationship Again, no null value in the foreign key…this is because of the mandatory minimum cardinality Foreign key
Figure 5-13: Example of mapping an M:N relationship (a) ER diagram (M:N) The  Supplies  relationship will need to become a separate relation
Figure 5-13(b) Three resulting relations New  intersection relation Foreign key Foreign key Composite primary key
Figure 5-14: Mapping a binary 1:1 relationship (a) Binary 1:1 relationship
Figure 5-14(b) Resulting relations
Transforming EER Diagrams into Relations ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Figure 5-15: Mapping an associative entity (a) Associative entity
Figure 5-15(b) Three resulting relations
Transforming EER Diagrams into Relations ,[object Object],[object Object],[object Object],[object Object],[object Object]
Figure 5-17: Mapping a unary 1:N relationship (a) EMPLOYEE entity with Manages relationship (b) EMPLOYEE relation with recursive foreign key
Figure 5-18: Mapping a unary M:N relationship (a) Bill-of-materials relationships (M:N) (b) ITEM and COMPONENT relations
Transforming EER Diagrams into Relations ,[object Object],[object Object],[object Object]
Figure 5-19: Mapping a ternary relationship (a) Ternary relationship with associative entity
Figure 5-19(b) Mapping the ternary relationship Remember that the primary key MUST be unique
Transforming EER Diagrams into Relations ,[object Object],[object Object],[object Object],[object Object],[object Object]
Figure 5-20: Supertype/subtype relationships
Figure 5-21:  Mapping Supertype/subtype relationships to relations
Data Normalization ,[object Object],[object Object]
Well-Structured Relations ,[object Object],[object Object],[object Object],[object Object],[object Object],General rule of thumb: a table should not pertain to more than one entity type
Example – Figure 5.2b Question – Is this a relation?   Answer – Yes: unique rows and no multivalued attributes Question – What’s the primary key?   Answer – Composite: Emp_ID, Course_Title
Anomalies in this Table ,[object Object],[object Object],[object Object],[object Object],[object Object]
Functional Dependencies and Keys ,[object Object],[object Object],[object Object],[object Object],[object Object]
5.22 -Steps in normalization
First Normal Form ,[object Object],[object Object],[object Object],[object Object],[object Object]
Second Normal Form ,[object Object],[object Object],[object Object],[object Object]
Fig 5.23(b) – Functional Dependencies in EMPLOYEE2 Dependency on entire primary key Dependency on only  part  of the key Therefore, NOT in 2 nd  Normal Form!! EmpID CourseTitle DateCompleted Salary DeptName Name EmpID, CourseTitle    DateCompleted EmpID    Name, DeptName, Salary
Getting it into 2 nd  Normal Form ,[object Object],Both are full functional dependencies EmpID Salary DeptName Name CourseTitle DateCompleted EmpID
Third Normal Form ,[object Object],[object Object]
Figure 5-24 -- Relation with transitive dependency (a) SALES relation with simple data
Figure 5-24(b) Relation with transitive dependency CustID    Name CustID    Salesperson CustID    Region All this is OK (2 nd  NF) BUT CustID    Salesperson    Region Transitive dependency (not 3 rd  NF)
Figure 5.25 -- Removing a transitive dependency (a) Decomposing the SALES relation
Figure 5.25(b) Relations in 3NF Now, there are no transitive dependencies… Both relations are in 3 rd  NF CustID    Name CustID    Salesperson Salesperson    Region
Other Normal Forms  (from Appendix B) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

More Related Content

What's hot

SQL practice questions - set 3
SQL practice questions - set 3SQL practice questions - set 3
SQL practice questions - set 3Mohd Tousif
 
Previous question papers of Database Management System (DBMS) By SHABEEB
Previous question papers of Database Management System (DBMS) By SHABEEBPrevious question papers of Database Management System (DBMS) By SHABEEB
Previous question papers of Database Management System (DBMS) By SHABEEBShabeeb Shabi
 
Database Systems - Relational Data Model (Chapter 2)
Database Systems - Relational Data Model (Chapter 2)Database Systems - Relational Data Model (Chapter 2)
Database Systems - Relational Data Model (Chapter 2)Vidyasagar Mundroy
 
FP304 DATABASE SYSTEM PAPER FINAL EXAM AGAIN
FP304 DATABASE SYSTEM  PAPER FINAL EXAM AGAINFP304 DATABASE SYSTEM  PAPER FINAL EXAM AGAIN
FP304 DATABASE SYSTEM PAPER FINAL EXAM AGAINSyahriha Ruslan
 
Chapter02 Managing Hardware Devices
Chapter02      Managing  Hardware  DevicesChapter02      Managing  Hardware  Devices
Chapter02 Managing Hardware DevicesRaja Waseem Akhtar
 
Chapter13 designing forms and reports
Chapter13 designing forms and reportsChapter13 designing forms and reports
Chapter13 designing forms and reportsDhani Ahmad
 
Key and its different types
Key and its different typesKey and its different types
Key and its different typesUmair Shakir
 
Referential integrity
Referential integrityReferential integrity
Referential integrityJubin Raju
 
Object oriented analysis
Object oriented analysisObject oriented analysis
Object oriented analysisMahesh Bhalerao
 
Web engineering - MVC
Web engineering - MVCWeb engineering - MVC
Web engineering - MVCNosheen Qamar
 
ER model to Relational model mapping
ER model to Relational model mappingER model to Relational model mapping
ER model to Relational model mappingShubham Saini
 
introduction to cryptography
introduction to cryptographyintroduction to cryptography
introduction to cryptographyPriyamvada Singh
 
Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)Jargalsaikhan Alyeksandr
 
Data Modeling PPT
Data Modeling PPTData Modeling PPT
Data Modeling PPTTrinath
 

What's hot (20)

SQL practice questions - set 3
SQL practice questions - set 3SQL practice questions - set 3
SQL practice questions - set 3
 
Previous question papers of Database Management System (DBMS) By SHABEEB
Previous question papers of Database Management System (DBMS) By SHABEEBPrevious question papers of Database Management System (DBMS) By SHABEEB
Previous question papers of Database Management System (DBMS) By SHABEEB
 
Basic SQL and History
 Basic SQL and History Basic SQL and History
Basic SQL and History
 
SQL Basics
SQL BasicsSQL Basics
SQL Basics
 
Database Systems - Relational Data Model (Chapter 2)
Database Systems - Relational Data Model (Chapter 2)Database Systems - Relational Data Model (Chapter 2)
Database Systems - Relational Data Model (Chapter 2)
 
FP304 DATABASE SYSTEM PAPER FINAL EXAM AGAIN
FP304 DATABASE SYSTEM  PAPER FINAL EXAM AGAINFP304 DATABASE SYSTEM  PAPER FINAL EXAM AGAIN
FP304 DATABASE SYSTEM PAPER FINAL EXAM AGAIN
 
SQL Overview
SQL OverviewSQL Overview
SQL Overview
 
Chapter02 Managing Hardware Devices
Chapter02      Managing  Hardware  DevicesChapter02      Managing  Hardware  Devices
Chapter02 Managing Hardware Devices
 
Chapter13 designing forms and reports
Chapter13 designing forms and reportsChapter13 designing forms and reports
Chapter13 designing forms and reports
 
Key and its different types
Key and its different typesKey and its different types
Key and its different types
 
Entity relationship modelling
Entity relationship modellingEntity relationship modelling
Entity relationship modelling
 
Referential integrity
Referential integrityReferential integrity
Referential integrity
 
Access practicals 2015
Access practicals 2015Access practicals 2015
Access practicals 2015
 
Object oriented analysis
Object oriented analysisObject oriented analysis
Object oriented analysis
 
Relational model
Relational modelRelational model
Relational model
 
Web engineering - MVC
Web engineering - MVCWeb engineering - MVC
Web engineering - MVC
 
ER model to Relational model mapping
ER model to Relational model mappingER model to Relational model mapping
ER model to Relational model mapping
 
introduction to cryptography
introduction to cryptographyintroduction to cryptography
introduction to cryptography
 
Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)
 
Data Modeling PPT
Data Modeling PPTData Modeling PPT
Data Modeling PPT
 

Viewers also liked

Logical database design and the relational model(database)
Logical database design and the relational model(database)Logical database design and the relational model(database)
Logical database design and the relational model(database)welcometofacebook
 
Logical design vs physical design
Logical design vs physical designLogical design vs physical design
Logical design vs physical designMd. Mahedi Mahfuj
 
Methodology logical database design for the relational
Methodology   logical database design for the relationalMethodology   logical database design for the relational
Methodology logical database design for the relationaluniversity of the punjab
 
DBMS Course Overview
DBMS Course OverviewDBMS Course Overview
DBMS Course OverviewEunice Orozco
 
Database Modeling Using Entity.. Weak And Strong Entity Types
Database Modeling Using Entity.. Weak And Strong Entity TypesDatabase Modeling Using Entity.. Weak And Strong Entity Types
Database Modeling Using Entity.. Weak And Strong Entity Typesaakanksha s
 
Physical database design(database)
Physical database design(database)Physical database design(database)
Physical database design(database)welcometofacebook
 
Ch 5 O O Data Modeling
Ch 5  O O  Data ModelingCh 5  O O  Data Modeling
Ch 5 O O Data Modelingguest8fdbdd
 
Ch 1 D B Environment
Ch 1  D B  EnvironmentCh 1  D B  Environment
Ch 1 D B Environmentguest8fdbdd
 
Vikram Chatwal Final
Vikram Chatwal FinalVikram Chatwal Final
Vikram Chatwal Finalguest8fdbdd
 
Methodology conceptual databases design roll no. 99 & 111
Methodology conceptual databases design roll no. 99 & 111Methodology conceptual databases design roll no. 99 & 111
Methodology conceptual databases design roll no. 99 & 111Manoj Nolkha
 
Ch 4 E E R Biz Rules
Ch 4  E E R  Biz RulesCh 4  E E R  Biz Rules
Ch 4 E E R Biz Rulesguest8fdbdd
 
modelingtools
modelingtoolsmodelingtools
modelingtoolslearnt
 
Understanding operating systems 5th ed ch11
Understanding operating systems 5th ed ch11Understanding operating systems 5th ed ch11
Understanding operating systems 5th ed ch11BarrBoy
 
Computer security design principles
Computer security design principlesComputer security design principles
Computer security design principlesShaishav Dahal
 
Documentation for developers
Documentation for developersDocumentation for developers
Documentation for developersMichael Marotta
 
Ch 7 Physical D B Design
Ch 7  Physical D B  DesignCh 7  Physical D B  Design
Ch 7 Physical D B Designguest8fdbdd
 
MN691 Assignment 3 - Final Report 2
MN691 Assignment 3 - Final Report 2MN691 Assignment 3 - Final Report 2
MN691 Assignment 3 - Final Report 2Abi Reddy
 

Viewers also liked (20)

Logical database design and the relational model(database)
Logical database design and the relational model(database)Logical database design and the relational model(database)
Logical database design and the relational model(database)
 
Logical design vs physical design
Logical design vs physical designLogical design vs physical design
Logical design vs physical design
 
Methodology logical database design for the relational
Methodology   logical database design for the relationalMethodology   logical database design for the relational
Methodology logical database design for the relational
 
DBMS Course Overview
DBMS Course OverviewDBMS Course Overview
DBMS Course Overview
 
Database Modeling Using Entity.. Weak And Strong Entity Types
Database Modeling Using Entity.. Weak And Strong Entity TypesDatabase Modeling Using Entity.. Weak And Strong Entity Types
Database Modeling Using Entity.. Weak And Strong Entity Types
 
Physical database design(database)
Physical database design(database)Physical database design(database)
Physical database design(database)
 
2 normalization
2 normalization2 normalization
2 normalization
 
Ch 5 O O Data Modeling
Ch 5  O O  Data ModelingCh 5  O O  Data Modeling
Ch 5 O O Data Modeling
 
Ch 1 D B Environment
Ch 1  D B  EnvironmentCh 1  D B  Environment
Ch 1 D B Environment
 
Vikram Chatwal Final
Vikram Chatwal FinalVikram Chatwal Final
Vikram Chatwal Final
 
Methodology conceptual databases design roll no. 99 & 111
Methodology conceptual databases design roll no. 99 & 111Methodology conceptual databases design roll no. 99 & 111
Methodology conceptual databases design roll no. 99 & 111
 
Ch 4 E E R Biz Rules
Ch 4  E E R  Biz RulesCh 4  E E R  Biz Rules
Ch 4 E E R Biz Rules
 
modelingtools
modelingtoolsmodelingtools
modelingtools
 
DataBase ch2
DataBase ch2DataBase ch2
DataBase ch2
 
Understanding operating systems 5th ed ch11
Understanding operating systems 5th ed ch11Understanding operating systems 5th ed ch11
Understanding operating systems 5th ed ch11
 
Computer security design principles
Computer security design principlesComputer security design principles
Computer security design principles
 
Documentation for developers
Documentation for developersDocumentation for developers
Documentation for developers
 
Ch 7 Physical D B Design
Ch 7  Physical D B  DesignCh 7  Physical D B  Design
Ch 7 Physical D B Design
 
Deadlocks
 Deadlocks Deadlocks
Deadlocks
 
MN691 Assignment 3 - Final Report 2
MN691 Assignment 3 - Final Report 2MN691 Assignment 3 - Final Report 2
MN691 Assignment 3 - Final Report 2
 

Similar to Ch 6 Logical D B Design (20)

Kul 2
Kul 2Kul 2
Kul 2
 
The Database Environment Chapter 5
The Database Environment Chapter 5The Database Environment Chapter 5
The Database Environment Chapter 5
 
Chap05 c
Chap05 cChap05 c
Chap05 c
 
ER to Relational Mapping
ER to Relational MappingER to Relational Mapping
ER to Relational Mapping
 
dbms er model
dbms er modeldbms er model
dbms er model
 
Eer >r.model
Eer >r.modelEer >r.model
Eer >r.model
 
Unit 2 DBMS
Unit 2 DBMSUnit 2 DBMS
Unit 2 DBMS
 
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
 
Unit 3 final.pptx
Unit 3 final.pptxUnit 3 final.pptx
Unit 3 final.pptx
 
DBMS - ER Model
DBMS - ER ModelDBMS - ER Model
DBMS - ER Model
 
L7 er2
L7 er2L7 er2
L7 er2
 
2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS
 
Test presentation
Test presentationTest presentation
Test presentation
 
Chapter 2 Relational Data Model-part 3
Chapter 2 Relational Data Model-part 3Chapter 2 Relational Data Model-part 3
Chapter 2 Relational Data Model-part 3
 
ER model
ER modelER model
ER model
 
Er model
Er modelEr model
Er model
 
dbms
dbmsdbms
dbms
 
Data & Databases
Data & Databases Data & Databases
Data & Databases
 
Basic concepts of Data and Databases
Basic concepts of Data and Databases Basic concepts of Data and Databases
Basic concepts of Data and Databases
 
RDBMS ER2 Relational
RDBMS ER2 RelationalRDBMS ER2 Relational
RDBMS ER2 Relational
 

More from guest8fdbdd

More from guest8fdbdd (20)

Wb Presentation
Wb PresentationWb Presentation
Wb Presentation
 
U T V Ppt
U T V PptU T V Ppt
U T V Ppt
 
V I D E O C O N
V I D E O C O NV I D E O C O N
V I D E O C O N
 
Tisco
TiscoTisco
Tisco
 
R A N B A X Yfinal
R A N B A X YfinalR A N B A X Yfinal
R A N B A X Yfinal
 
R A V I J A I P U R I A[1]
R A V I  J A I P U R I A[1]R A V I  J A I P U R I A[1]
R A V I J A I P U R I A[1]
 
Puma And Evisu
Puma And EvisuPuma And Evisu
Puma And Evisu
 
Ppt
PptPpt
Ppt
 
Hershey G B F L 2
Hershey  G B F L 2Hershey  G B F L 2
Hershey G B F L 2
 
Nike
NikeNike
Nike
 
L J H O O K E R 1
L J  H O O K E R 1L J  H O O K E R 1
L J H O O K E R 1
 
M I K E P A T E L 1
M I K E  P A T E L 1M I K E  P A T E L 1
M I K E P A T E L 1
 
Joy Alukkas
Joy AlukkasJoy Alukkas
Joy Alukkas
 
New Mr
New MrNew Mr
New Mr
 
Mahindra Renault
Mahindra RenaultMahindra Renault
Mahindra Renault
 
F I N A L
F I N A LF I N A L
F I N A L
 
Abhishek Saraff1
Abhishek  Saraff1Abhishek  Saraff1
Abhishek Saraff1
 
Abhishek Saraff
Abhishek  SaraffAbhishek  Saraff
Abhishek Saraff
 
L G 2
L G 2L G 2
L G 2
 
M E H U L C H O K S I
M E H U L  C H O K S IM E H U L  C H O K S I
M E H U L C H O K S I
 

Recently uploaded

Call Girls in Kalkaji Delhi 8264348440 call girls ❤️
Call Girls in Kalkaji Delhi 8264348440 call girls ❤️Call Girls in Kalkaji Delhi 8264348440 call girls ❤️
Call Girls in Kalkaji Delhi 8264348440 call girls ❤️soniya singh
 
The_Canvas_of_Creative_Mastery_Newsletter_April_2024_Version.pdf
The_Canvas_of_Creative_Mastery_Newsletter_April_2024_Version.pdfThe_Canvas_of_Creative_Mastery_Newsletter_April_2024_Version.pdf
The_Canvas_of_Creative_Mastery_Newsletter_April_2024_Version.pdfAmirYakdi
 
DragonBall PowerPoint Template for demo.pptx
DragonBall PowerPoint Template for demo.pptxDragonBall PowerPoint Template for demo.pptx
DragonBall PowerPoint Template for demo.pptxmirandajeremy200221
 
WAEC Carpentry and Joinery Past Questions
WAEC Carpentry and Joinery Past QuestionsWAEC Carpentry and Joinery Past Questions
WAEC Carpentry and Joinery Past QuestionsCharles Obaleagbon
 
NO1 Trending kala jadu Love Marriage Black Magic Punjab Powerful Black Magic ...
NO1 Trending kala jadu Love Marriage Black Magic Punjab Powerful Black Magic ...NO1 Trending kala jadu Love Marriage Black Magic Punjab Powerful Black Magic ...
NO1 Trending kala jadu Love Marriage Black Magic Punjab Powerful Black Magic ...Amil baba
 
Verified Trusted Call Girls Adugodi💘 9352852248 Good Looking standard Profil...
Verified Trusted Call Girls Adugodi💘 9352852248  Good Looking standard Profil...Verified Trusted Call Girls Adugodi💘 9352852248  Good Looking standard Profil...
Verified Trusted Call Girls Adugodi💘 9352852248 Good Looking standard Profil...kumaririma588
 
Fashion trends before and after covid.pptx
Fashion trends before and after covid.pptxFashion trends before and after covid.pptx
Fashion trends before and after covid.pptxVanshNarang19
 
Kurla Call Girls Pooja Nehwal📞 9892124323 ✅ Vashi Call Service Available Nea...
Kurla Call Girls Pooja Nehwal📞 9892124323 ✅  Vashi Call Service Available Nea...Kurla Call Girls Pooja Nehwal📞 9892124323 ✅  Vashi Call Service Available Nea...
Kurla Call Girls Pooja Nehwal📞 9892124323 ✅ Vashi Call Service Available Nea...Pooja Nehwal
 
Design Inspiration for College by Slidesgo.pptx
Design Inspiration for College by Slidesgo.pptxDesign Inspiration for College by Slidesgo.pptx
Design Inspiration for College by Slidesgo.pptxTusharBahuguna2
 
VIP Call Girls Bhiwandi Ananya 8250192130 Independent Escort Service Bhiwandi
VIP Call Girls Bhiwandi Ananya 8250192130 Independent Escort Service BhiwandiVIP Call Girls Bhiwandi Ananya 8250192130 Independent Escort Service Bhiwandi
VIP Call Girls Bhiwandi Ananya 8250192130 Independent Escort Service BhiwandiSuhani Kapoor
 
SD_The MATATAG Curriculum Training Design.pptx
SD_The MATATAG Curriculum Training Design.pptxSD_The MATATAG Curriculum Training Design.pptx
SD_The MATATAG Curriculum Training Design.pptxjanettecruzeiro1
 
Stark Industries Marketing Plan (1).pptx
Stark Industries Marketing Plan (1).pptxStark Industries Marketing Plan (1).pptx
Stark Industries Marketing Plan (1).pptxjeswinjees
 
SCRIP Lua HTTP PROGRACMACION PLC WECON CA
SCRIP Lua HTTP PROGRACMACION PLC  WECON CASCRIP Lua HTTP PROGRACMACION PLC  WECON CA
SCRIP Lua HTTP PROGRACMACION PLC WECON CANestorGamez6
 
Petrosains Drama Competition (PSDC).pptx
Petrosains Drama Competition (PSDC).pptxPetrosains Drama Competition (PSDC).pptx
Petrosains Drama Competition (PSDC).pptxIgnatiusAbrahamBalin
 
CALL ON ➥8923113531 🔝Call Girls Aminabad Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Aminabad Lucknow best Night Fun serviceCALL ON ➥8923113531 🔝Call Girls Aminabad Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Aminabad Lucknow best Night Fun serviceanilsa9823
 
Top Rated Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...
Top Rated  Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...Top Rated  Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...
Top Rated Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...Call Girls in Nagpur High Profile
 
Chapter 19_DDA_TOD Policy_First Draft 2012.pdf
Chapter 19_DDA_TOD Policy_First Draft 2012.pdfChapter 19_DDA_TOD Policy_First Draft 2012.pdf
Chapter 19_DDA_TOD Policy_First Draft 2012.pdfParomita Roy
 

Recently uploaded (20)

Call Girls in Kalkaji Delhi 8264348440 call girls ❤️
Call Girls in Kalkaji Delhi 8264348440 call girls ❤️Call Girls in Kalkaji Delhi 8264348440 call girls ❤️
Call Girls in Kalkaji Delhi 8264348440 call girls ❤️
 
The_Canvas_of_Creative_Mastery_Newsletter_April_2024_Version.pdf
The_Canvas_of_Creative_Mastery_Newsletter_April_2024_Version.pdfThe_Canvas_of_Creative_Mastery_Newsletter_April_2024_Version.pdf
The_Canvas_of_Creative_Mastery_Newsletter_April_2024_Version.pdf
 
DragonBall PowerPoint Template for demo.pptx
DragonBall PowerPoint Template for demo.pptxDragonBall PowerPoint Template for demo.pptx
DragonBall PowerPoint Template for demo.pptx
 
WAEC Carpentry and Joinery Past Questions
WAEC Carpentry and Joinery Past QuestionsWAEC Carpentry and Joinery Past Questions
WAEC Carpentry and Joinery Past Questions
 
NO1 Trending kala jadu Love Marriage Black Magic Punjab Powerful Black Magic ...
NO1 Trending kala jadu Love Marriage Black Magic Punjab Powerful Black Magic ...NO1 Trending kala jadu Love Marriage Black Magic Punjab Powerful Black Magic ...
NO1 Trending kala jadu Love Marriage Black Magic Punjab Powerful Black Magic ...
 
Verified Trusted Call Girls Adugodi💘 9352852248 Good Looking standard Profil...
Verified Trusted Call Girls Adugodi💘 9352852248  Good Looking standard Profil...Verified Trusted Call Girls Adugodi💘 9352852248  Good Looking standard Profil...
Verified Trusted Call Girls Adugodi💘 9352852248 Good Looking standard Profil...
 
Fashion trends before and after covid.pptx
Fashion trends before and after covid.pptxFashion trends before and after covid.pptx
Fashion trends before and after covid.pptx
 
Kurla Call Girls Pooja Nehwal📞 9892124323 ✅ Vashi Call Service Available Nea...
Kurla Call Girls Pooja Nehwal📞 9892124323 ✅  Vashi Call Service Available Nea...Kurla Call Girls Pooja Nehwal📞 9892124323 ✅  Vashi Call Service Available Nea...
Kurla Call Girls Pooja Nehwal📞 9892124323 ✅ Vashi Call Service Available Nea...
 
Design Inspiration for College by Slidesgo.pptx
Design Inspiration for College by Slidesgo.pptxDesign Inspiration for College by Slidesgo.pptx
Design Inspiration for College by Slidesgo.pptx
 
VIP Call Girls Bhiwandi Ananya 8250192130 Independent Escort Service Bhiwandi
VIP Call Girls Bhiwandi Ananya 8250192130 Independent Escort Service BhiwandiVIP Call Girls Bhiwandi Ananya 8250192130 Independent Escort Service Bhiwandi
VIP Call Girls Bhiwandi Ananya 8250192130 Independent Escort Service Bhiwandi
 
SD_The MATATAG Curriculum Training Design.pptx
SD_The MATATAG Curriculum Training Design.pptxSD_The MATATAG Curriculum Training Design.pptx
SD_The MATATAG Curriculum Training Design.pptx
 
Stark Industries Marketing Plan (1).pptx
Stark Industries Marketing Plan (1).pptxStark Industries Marketing Plan (1).pptx
Stark Industries Marketing Plan (1).pptx
 
escort service sasti (*~Call Girls in Prasad Nagar Metro❤️9953056974
escort service sasti (*~Call Girls in Prasad Nagar Metro❤️9953056974escort service sasti (*~Call Girls in Prasad Nagar Metro❤️9953056974
escort service sasti (*~Call Girls in Prasad Nagar Metro❤️9953056974
 
SCRIP Lua HTTP PROGRACMACION PLC WECON CA
SCRIP Lua HTTP PROGRACMACION PLC  WECON CASCRIP Lua HTTP PROGRACMACION PLC  WECON CA
SCRIP Lua HTTP PROGRACMACION PLC WECON CA
 
B. Smith. (Architectural Portfolio.).pdf
B. Smith. (Architectural Portfolio.).pdfB. Smith. (Architectural Portfolio.).pdf
B. Smith. (Architectural Portfolio.).pdf
 
Call Girls Service Mukherjee Nagar @9999965857 Delhi 🫦 No Advance VVIP 🍎 SER...
Call Girls Service Mukherjee Nagar @9999965857 Delhi 🫦 No Advance  VVIP 🍎 SER...Call Girls Service Mukherjee Nagar @9999965857 Delhi 🫦 No Advance  VVIP 🍎 SER...
Call Girls Service Mukherjee Nagar @9999965857 Delhi 🫦 No Advance VVIP 🍎 SER...
 
Petrosains Drama Competition (PSDC).pptx
Petrosains Drama Competition (PSDC).pptxPetrosains Drama Competition (PSDC).pptx
Petrosains Drama Competition (PSDC).pptx
 
CALL ON ➥8923113531 🔝Call Girls Aminabad Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Aminabad Lucknow best Night Fun serviceCALL ON ➥8923113531 🔝Call Girls Aminabad Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Aminabad Lucknow best Night Fun service
 
Top Rated Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...
Top Rated  Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...Top Rated  Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...
Top Rated Pune Call Girls Koregaon Park ⟟ 6297143586 ⟟ Call Me For Genuine S...
 
Chapter 19_DDA_TOD Policy_First Draft 2012.pdf
Chapter 19_DDA_TOD Policy_First Draft 2012.pdfChapter 19_DDA_TOD Policy_First Draft 2012.pdf
Chapter 19_DDA_TOD Policy_First Draft 2012.pdf
 

Ch 6 Logical D B Design

  • 1. Logical Database Design and the Relational Model Modern Database Management Jeffrey A. Hoffer, Mary B. Prescott, Fred R. McFadden
  • 2.
  • 3.
  • 4.
  • 5. Figure 5-3 -- Schema for four relations (Pine Valley Furniture) Primary Key Foreign Key (implements 1:N relationship between customer and order) Combined, these are a composite primary key (uniquely identifies the order line)…individually they are foreign keys (implement M:N relationship between order and product)
  • 6.
  • 7.
  • 8. Figure 5-5: Referential integrity constraints (Pine Valley Furniture) Referential integrity constraints are drawn via arrows from dependent to parent table
  • 9.
  • 10. (a) CUSTOMER entity type with simple attributes Figure 5-8: Mapping a regular entity (b) CUSTOMER relation
  • 11. (a) CUSTOMER entity type with composite attribute Figure 5-9: Mapping a composite attribute (b) CUSTOMER relation with address detail
  • 12. Figure 5-10: Mapping a multivalued attribute 1 – to – many relationship between original entity and new relation (a) Multivalued attribute becomes a separate relation with foreign key (b)
  • 13.
  • 14. Figure 5-11: Example of mapping a weak entity (a) Weak entity DEPENDENT
  • 15. Figure 5-11(b) Relations resulting from weak entity NOTE: the domain constraint for the foreign key should NOT allow null value if DEPENDENT is a weak entity Foreign key Composite primary key
  • 16.
  • 17. Figure 5-12: Example of mapping a 1:M relationship (a) Relationship between customers and orders Note the mandatory one
  • 18. Figure 5-12(b) Mapping the relationship Again, no null value in the foreign key…this is because of the mandatory minimum cardinality Foreign key
  • 19. Figure 5-13: Example of mapping an M:N relationship (a) ER diagram (M:N) The Supplies relationship will need to become a separate relation
  • 20. Figure 5-13(b) Three resulting relations New intersection relation Foreign key Foreign key Composite primary key
  • 21. Figure 5-14: Mapping a binary 1:1 relationship (a) Binary 1:1 relationship
  • 23.
  • 24. Figure 5-15: Mapping an associative entity (a) Associative entity
  • 25. Figure 5-15(b) Three resulting relations
  • 26.
  • 27. Figure 5-17: Mapping a unary 1:N relationship (a) EMPLOYEE entity with Manages relationship (b) EMPLOYEE relation with recursive foreign key
  • 28. Figure 5-18: Mapping a unary M:N relationship (a) Bill-of-materials relationships (M:N) (b) ITEM and COMPONENT relations
  • 29.
  • 30. Figure 5-19: Mapping a ternary relationship (a) Ternary relationship with associative entity
  • 31. Figure 5-19(b) Mapping the ternary relationship Remember that the primary key MUST be unique
  • 32.
  • 34. Figure 5-21: Mapping Supertype/subtype relationships to relations
  • 35.
  • 36.
  • 37. Example – Figure 5.2b Question – Is this a relation? Answer – Yes: unique rows and no multivalued attributes Question – What’s the primary key? Answer – Composite: Emp_ID, Course_Title
  • 38.
  • 39.
  • 40. 5.22 -Steps in normalization
  • 41.
  • 42.
  • 43. Fig 5.23(b) – Functional Dependencies in EMPLOYEE2 Dependency on entire primary key Dependency on only part of the key Therefore, NOT in 2 nd Normal Form!! EmpID CourseTitle DateCompleted Salary DeptName Name EmpID, CourseTitle  DateCompleted EmpID  Name, DeptName, Salary
  • 44.
  • 45.
  • 46. Figure 5-24 -- Relation with transitive dependency (a) SALES relation with simple data
  • 47. Figure 5-24(b) Relation with transitive dependency CustID  Name CustID  Salesperson CustID  Region All this is OK (2 nd NF) BUT CustID  Salesperson  Region Transitive dependency (not 3 rd NF)
  • 48. Figure 5.25 -- Removing a transitive dependency (a) Decomposing the SALES relation
  • 49. Figure 5.25(b) Relations in 3NF Now, there are no transitive dependencies… Both relations are in 3 rd NF CustID  Name CustID  Salesperson Salesperson  Region
  • 50.