SlideShare a Scribd company logo
Chapter 7: Relational Database Design
Chapter 7: Relational Database Design ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],7.2 Database System Concepts - 5 th  Edition, July 28, 2005.
The Banking Schema ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],7.3 Database System Concepts - 5 th  Edition, July 28, 2005.
Combine Schemas? ,[object Object],[object Object],[object Object],7.4 Database System Concepts - 5 th  Edition, July 28, 2005.
A Combined Schema Without Repetition ,[object Object],[object Object],[object Object],7.5 Database System Concepts - 5 th  Edition, July 28, 2005.
What About Smaller Schemas? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],7.6 Database System Concepts - 5 th  Edition, July 28, 2005.
A Lossy Decomposition 7.7 Database System Concepts - 5 th  Edition, July 28, 2005.
First Normal Form ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],7.8 Database System Concepts - 5 th  Edition, July 28, 2005.
First Normal Form (Cont’d) ,[object Object],[object Object],[object Object],[object Object],[object Object],7.9 Database System Concepts - 5 th  Edition, July 28, 2005.
Goal — Devise a Theory for the Following ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],7.10 Database System Concepts - 5 th  Edition, July 28, 2005.
Functional Dependencies ,[object Object],[object Object],[object Object],7.11 Database System Concepts - 5 th  Edition, July 28, 2005.
Functional Dependencies (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],7.12 Database System Concepts - 5 th  Edition, July 28, 2005. ,[object Object],[object Object],[object Object]
Functional Dependencies (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],7.13 Database System Concepts - 5 th  Edition, July 28, 2005.
Use of Functional Dependencies ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],7.14 Database System Concepts - 5 th  Edition, July 28, 2005.
Functional Dependencies (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],7.15 Database System Concepts - 5 th  Edition, July 28, 2005.
Closure of a Set of Functional Dependencies ,[object Object],[object Object],[object Object],[object Object],[object Object],7.16 Database System Concepts - 5 th  Edition, July 28, 2005.
Boyce-Codd Normal Form ,[object Object],[object Object],7.17 Database System Concepts - 5 th  Edition, July 28, 2005. A relation schema  R  is in BCNF with respect to a set  F  of functional dependencies if for all functional dependencies in  F +  of the form     where    R  and      R ,   at least one of the following holds: Example schema  not  in BCNF: bor_loan  = (  customer_id, loan_number, amount  ) because  loan_number     amount  holds on  bor_loan  but  loan_number  is not a superkey
Decomposing a Schema into BCNF ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],7.18 Database System Concepts - 5 th  Edition, July 28, 2005.
BCNF and Dependency Preservation ,[object Object],[object Object],[object Object],7.19 Database System Concepts - 5 th  Edition, July 28, 2005.
Third Normal Form ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],7.20 Database System Concepts - 5 th  Edition, July 28, 2005.
Goals of Normalization ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],7.21 Database System Concepts - 5 th  Edition, July 28, 2005.
How good is BCNF? ,[object Object],[object Object],[object Object],[object Object],[object Object],7.22 Database System Concepts - 5 th  Edition, July 28, 2005.
[object Object],[object Object],[object Object],How good is BCNF? (Cont.) 7.23 Database System Concepts - 5 th  Edition, July 28, 2005. course teacher book database database database database database database operating systems operating systems operating systems operating systems Avi Avi Hank Hank Sudarshan Sudarshan Avi Avi  Pete Pete DB Concepts Ullman DB Concepts Ullman DB Concepts Ullman OS Concepts Stallings OS Concepts Stallings classes
[object Object],How good is BCNF? (Cont.) 7.24 Database System Concepts - 5 th  Edition, July 28, 2005. course teacher database database database operating systems operating systems Avi Hank Sudarshan Avi  Jim teaches course book database database operating systems operating systems DB Concepts Ullman OS Concepts Shaw text This suggests the need for higher normal forms, such as Fourth Normal Form (4NF), which we shall see later.
Functional-Dependency Theory ,[object Object],[object Object],[object Object],7.25 Database System Concepts - 5 th  Edition, July 28, 2005.
Closure of a Set of Functional Dependencies ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],7.26 Database System Concepts - 5 th  Edition, July 28, 2005.
Example ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],7.27 Database System Concepts - 5 th  Edition, July 28, 2005.
Procedure for Computing F + ,[object Object],[object Object],[object Object],7.28 Database System Concepts - 5 th  Edition, July 28, 2005.
Closure of Functional Dependencies (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],7.29 Database System Concepts - 5 th  Edition, July 28, 2005.
Closure of Attribute Sets ,[object Object],[object Object],[object Object],7.30 Database System Concepts - 5 th  Edition, July 28, 2005.
Example of Attribute Set Closure ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],7.31 Database System Concepts - 5 th  Edition, July 28, 2005.
Uses of Attribute Closure ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],7.32 Database System Concepts - 5 th  Edition, July 28, 2005.
Canonical Cover ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],7.33 Database System Concepts - 5 th  Edition, July 28, 2005.
Extraneous Attributes ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],7.34 Database System Concepts - 5 th  Edition, July 28, 2005.
Testing if an Attribute is Extraneous ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],7.35 Database System Concepts - 5 th  Edition, July 28, 2005.
Canonical Cover ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],7.36 Database System Concepts - 5 th  Edition, July 28, 2005.
Computing a Canonical Cover ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],7.37 Database System Concepts - 5 th  Edition, July 28, 2005.
Lossless-join Decomposition ,[object Object],[object Object],[object Object],[object Object],[object Object],7.38 Database System Concepts - 5 th  Edition, July 28, 2005.
Example ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],7.39 Database System Concepts - 5 th  Edition, July 28, 2005.
Dependency Preservation ,[object Object],[object Object],[object Object],[object Object],7.40 Database System Concepts - 5 th  Edition, July 28, 2005.
Testing for Dependency Preservation ,[object Object],[object Object],[object Object],[object Object],[object Object],7.41 Database System Concepts - 5 th  Edition, July 28, 2005.
Example ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],7.42 Database System Concepts - 5 th  Edition, July 28, 2005.
Testing for BCNF ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],7.43 Database System Concepts - 5 th  Edition, July 28, 2005.
Testing Decomposition for BCNF ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],7.44 Database System Concepts - 5 th  Edition, July 28, 2005.
BCNF Decomposition Algorithm result  := { R  }; done  := false; compute  F  + ; while (not  done)  do if  (there is a schema  R i   in  result  that is not in BCNF) then begin let      be a nontrivial functional dependency that holds on  R i such that    R i   is not in  F  + ,  and     =  ; result  := ( result – R i  )   ( R i  –  )  (,   ); end else  done  :=  true;  Note: each  R i   is in BCNF, and decomposition is lossless-join. 7.45 Database System Concepts - 5 th  Edition, July 28, 2005.
Example of BCNF Decomposition ,[object Object],[object Object],[object Object],[object Object],[object Object],7.46 Database System Concepts - 5 th  Edition, July 28, 2005.
Example of BCNF Decomposition ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],7.47 Database System Concepts - 5 th  Edition, July 28, 2005.
BCNF and Dependency Preservation ,[object Object],[object Object],[object Object],[object Object],[object Object],7.48 Database System Concepts - 5 th  Edition, July 28, 2005. It is not always possible to get a BCNF decomposition that is  dependency preserving
Third Normal Form: Motivation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],7.49 Database System Concepts - 5 th  Edition, July 28, 2005.
3NF Example ,[object Object],[object Object],[object Object],[object Object],[object Object],7.50 Database System Concepts - 5 th  Edition, July 28, 2005.
Redundancy in 3NF ,[object Object],[object Object],[object Object],7.51 Database System Concepts - 5 th  Edition, July 28, 2005. J j 1 j 2 j 3 null L l 1 l 1 l 1 l 2 K k 1 k 1 k 1 k 2 ,[object Object],[object Object]
Testing for 3NF ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],7.52 Database System Concepts - 5 th  Edition, July 28, 2005.
3NF Decomposition Algorithm Let  F c   be a canonical cover for  F; i  := 0; for each  functional dependency      in  F c   do if  none of the schemas  R j ,  1   j    i  contains     then begin i  :=  i +  1; R i  :=     end if  none of the schemas  R j ,  1   j    i  contains a candidate key for  R then begin i  :=  i  + 1; R i  := any candidate key for  R; end  return  (R 1 ,  R 2 , ...,  R i )  7.53 Database System Concepts - 5 th  Edition, July 28, 2005.
3NF Decomposition Algorithm (Cont.) ,[object Object],[object Object],[object Object],[object Object],7.54 Database System Concepts - 5 th  Edition, July 28, 2005.
3NF Decomposition: An Example ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],7.55 Database System Concepts - 5 th  Edition, July 28, 2005.
3NF Decompsition Example (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],7.56 Database System Concepts - 5 th  Edition, July 28, 2005.
Comparison of BCNF and 3NF ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],7.57 Database System Concepts - 5 th  Edition, July 28, 2005.
Design Goals ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],7.58 Database System Concepts - 5 th  Edition, July 28, 2005.
Multivalued Dependencies (MVDs) ,[object Object],[object Object],[object Object],[object Object],7.59 Database System Concepts - 5 th  Edition, July 28, 2005.
MVD (Cont.) ,[object Object],7.60 Database System Concepts - 5 th  Edition, July 28, 2005.
Example ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],7.61 Database System Concepts - 5 th  Edition, July 28, 2005.
Example (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],7.62 Database System Concepts - 5 th  Edition, July 28, 2005.
Use of Multivalued Dependencies ,[object Object],[object Object],[object Object],[object Object],7.63 Database System Concepts - 5 th  Edition, July 28, 2005.
Theory of MVDs ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],7.64 Database System Concepts - 5 th  Edition, July 28, 2005.
Fourth Normal Form ,[object Object],[object Object],[object Object],[object Object],7.65 Database System Concepts - 5 th  Edition, July 28, 2005.
Restriction of Multivalued Dependencies ,[object Object],[object Object],[object Object],[object Object],[object Object],7.66 Database System Concepts - 5 th  Edition, July 28, 2005.
4NF Decomposition Algorithm result:  = { R }; done  := false; compute D + ; Let D i  denote the restriction of D +  to R i while  ( not  done )  if  (there is a schema  R i  in  result  that is not in 4NF)  then begin let      be a nontrivial multivalued dependency that holds on  R i  such that    R i  is not in  D i , and ;  result  := ( result  -  R i )  ( R i   - )  (, );  end else  done := true; Note: each  R i   is in 4NF, and decomposition is lossless-join 7.67 Database System Concepts - 5 th  Edition, July 28, 2005.
Example ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],7.68 Database System Concepts - 5 th  Edition, July 28, 2005.
Further Normal Forms ,[object Object],[object Object],[object Object],[object Object],[object Object],7.69 Database System Concepts - 5 th  Edition, July 28, 2005.
Overall Database Design Process ,[object Object],[object Object],[object Object],[object Object],[object Object],7.70 Database System Concepts - 5 th  Edition, July 28, 2005.
ER Model and Normalization ,[object Object],[object Object],[object Object],[object Object],[object Object],7.71 Database System Concepts - 5 th  Edition, July 28, 2005.
Denormalization for Performance ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],7.72 Database System Concepts - 5 th  Edition, July 28, 2005.
Other Design Issues ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],7.73 Database System Concepts - 5 th  Edition, July 28, 2005.
Modeling Temporal Data ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],7.74 Database System Concepts - 5 th  Edition, July 28, 2005. 
Modeling Temporal Data (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],7.75 Database System Concepts - 5 th  Edition, July 28, 2005.
End of Chapter
Proof of Correctness of 3NF Decomposition Algorithm
Correctness of 3NF Decomposition Algorithm ,[object Object],[object Object],[object Object],[object Object],[object Object],7.78 Database System Concepts - 5 th  Edition, July 28, 2005.
Correctness of 3NF Decomposition Algorithm (Cont’d.) ,[object Object],[object Object],[object Object],[object Object],[object Object],7.79 Database System Concepts - 5 th  Edition, July 28, 2005.
Correctness of 3NF Decomposition (Cont’d.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],7.80 Database System Concepts - 5 th  Edition, July 28, 2005.
Correctness of 3NF Decomposition (Cont’d.) ,[object Object],[object Object],[object Object],[object Object],[object Object],7.81 Database System Concepts - 5 th  Edition, July 28, 2005.
Figure 7.5: Sample Relation  r 7.82 Database System Concepts - 5 th  Edition, July 28, 2005.
Figure 7.6 7.83 Database System Concepts - 5 th  Edition, July 28, 2005.
Figure 7.7 7.84 Database System Concepts - 5 th  Edition, July 28, 2005.
Figure 7.15: An Example of  Redundancy in a BCNF Relation 7.85 Database System Concepts - 5 th  Edition, July 28, 2005.
Figure 7.16: An Illegal  R 2   Relation 7.86 Database System Concepts - 5 th  Edition, July 28, 2005.
Figure 7.18: Relation of Practice Exercise 7.2 7.87 Database System Concepts - 5 th  Edition, July 28, 2005.

More Related Content

What's hot

Chapter 7 relation database language
Chapter 7 relation database languageChapter 7 relation database language
Chapter 7 relation database language
Jafar Nesargi
 
6. Integrity and Security in DBMS
6. Integrity and Security in DBMS6. Integrity and Security in DBMS
6. Integrity and Security in DBMS
koolkampus
 
Functional dependencies and normalization for relational databases
Functional dependencies and normalization for relational databasesFunctional dependencies and normalization for relational databases
Functional dependencies and normalization for relational databases
Jafar Nesargi
 
4 the relational data model and relational database constraints
4 the relational data model and relational database constraints4 the relational data model and relational database constraints
4 the relational data model and relational database constraints
Kumar
 
Functional dependencies and normalization
Functional dependencies and normalizationFunctional dependencies and normalization
Functional dependencies and normalization
daxesh chauhan
 
Revision1510(1)
Revision1510(1)Revision1510(1)
Revision1510(1)
Xin Li
 
3. Relational Models in DBMS
3. Relational Models in DBMS3. Relational Models in DBMS
3. Relational Models in DBMS
koolkampus
 

What's hot (20)

DBMS Canonical cover
DBMS Canonical coverDBMS Canonical cover
DBMS Canonical cover
 
Chapter 7 relation database language
Chapter 7 relation database languageChapter 7 relation database language
Chapter 7 relation database language
 
Chapter10
Chapter10Chapter10
Chapter10
 
6. Integrity and Security in DBMS
6. Integrity and Security in DBMS6. Integrity and Security in DBMS
6. Integrity and Security in DBMS
 
Normalization1
Normalization1Normalization1
Normalization1
 
Functional dependencies and normalization for relational databases
Functional dependencies and normalization for relational databasesFunctional dependencies and normalization for relational databases
Functional dependencies and normalization for relational databases
 
4 the relational data model and relational database constraints
4 the relational data model and relational database constraints4 the relational data model and relational database constraints
4 the relational data model and relational database constraints
 
Functional dependencies and normalization
Functional dependencies and normalizationFunctional dependencies and normalization
Functional dependencies and normalization
 
Database management system session 5
Database management system session 5Database management system session 5
Database management system session 5
 
Dbms unit-3
Dbms unit-3Dbms unit-3
Dbms unit-3
 
Join dependency
Join dependencyJoin dependency
Join dependency
 
Functional dependancy
Functional dependancyFunctional dependancy
Functional dependancy
 
Revision1510(1)
Revision1510(1)Revision1510(1)
Revision1510(1)
 
3. Relational Models in DBMS
3. Relational Models in DBMS3. Relational Models in DBMS
3. Relational Models in DBMS
 
Database normalization
Database normalizationDatabase normalization
Database normalization
 
DBMS Helping material
DBMS Helping materialDBMS Helping material
DBMS Helping material
 
Normalization
NormalizationNormalization
Normalization
 
Functional dependency
Functional dependencyFunctional dependency
Functional dependency
 
Database normalization
Database normalizationDatabase normalization
Database normalization
 
DBMS CS2
DBMS CS2DBMS CS2
DBMS CS2
 

Similar to ch7 (20)

L8 design1
L8 design1L8 design1
L8 design1
 
ch2
ch2ch2
ch2
 
Ch7
Ch7Ch7
Ch7
 
DBMS-Ch7-MKB (1).pdf
DBMS-Ch7-MKB (1).pdfDBMS-Ch7-MKB (1).pdf
DBMS-Ch7-MKB (1).pdf
 
ch6
ch6ch6
ch6
 
L9 design2
L9 design2L9 design2
L9 design2
 
Functional dependency.pptx
Functional dependency.pptxFunctional dependency.pptx
Functional dependency.pptx
 
Database
DatabaseDatabase
Database
 
Ch7
Ch7Ch7
Ch7
 
Ch7
Ch7Ch7
Ch7
 
Lecture No. 21-22.ppt
Lecture No. 21-22.pptLecture No. 21-22.ppt
Lecture No. 21-22.ppt
 
Lecture_W9_Normalization.ppt
Lecture_W9_Normalization.pptLecture_W9_Normalization.ppt
Lecture_W9_Normalization.ppt
 
Design dbms
Design dbmsDesign dbms
Design dbms
 
DBMS.pdf
DBMS.pdfDBMS.pdf
DBMS.pdf
 
Introduction to database-Normalisation
Introduction to database-NormalisationIntroduction to database-Normalisation
Introduction to database-Normalisation
 
DBMS-Normalization.ppt
DBMS-Normalization.pptDBMS-Normalization.ppt
DBMS-Normalization.ppt
 
DATA BASE MANAGEMENT SYSTEM - SHORT NOTES
DATA BASE MANAGEMENT SYSTEM - SHORT NOTESDATA BASE MANAGEMENT SYSTEM - SHORT NOTES
DATA BASE MANAGEMENT SYSTEM - SHORT NOTES
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database Design
 
ER Models.ppt
ER Models.pptER Models.ppt
ER Models.ppt
 
DATABASE MANAGEMENT SYSTEMS ER MODEL.ppt
DATABASE MANAGEMENT SYSTEMS ER MODEL.pptDATABASE MANAGEMENT SYSTEMS ER MODEL.ppt
DATABASE MANAGEMENT SYSTEMS ER MODEL.ppt
 

More from KITE www.kitecolleges.com (20)

DISTRIBUTED INTERACTIVE VIRTUAL ENVIRONMENT
DISTRIBUTED INTERACTIVE VIRTUAL ENVIRONMENTDISTRIBUTED INTERACTIVE VIRTUAL ENVIRONMENT
DISTRIBUTED INTERACTIVE VIRTUAL ENVIRONMENT
 
BrainFingerprintingpresentation
BrainFingerprintingpresentationBrainFingerprintingpresentation
BrainFingerprintingpresentation
 
week-11x
week-11xweek-11x
week-11x
 
PPT (2)
PPT (2)PPT (2)
PPT (2)
 
week-10x
week-10xweek-10x
week-10x
 
week-1x
week-1xweek-1x
week-1x
 
week-18x
week-18xweek-18x
week-18x
 
ch14
ch14ch14
ch14
 
ch16
ch16ch16
ch16
 
holographic versatile disc
holographic versatile discholographic versatile disc
holographic versatile disc
 
week-22x
week-22xweek-22x
week-22x
 
week-16x
week-16xweek-16x
week-16x
 
week-5x
week-5xweek-5x
week-5x
 
week-6x
week-6xweek-6x
week-6x
 
week-3x
week-3xweek-3x
week-3x
 
ch8
ch8ch8
ch8
 
Intro Expert Systems test-me.co.uk
Intro Expert Systems test-me.co.ukIntro Expert Systems test-me.co.uk
Intro Expert Systems test-me.co.uk
 
ch17
ch17ch17
ch17
 
ch4
ch4ch4
ch4
 
week-7x
week-7xweek-7x
week-7x
 

Recently uploaded

Industrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportIndustrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training Report
Avinash Rai
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 

Recently uploaded (20)

The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 
The impact of social media on mental health and well-being has been a topic o...
The impact of social media on mental health and well-being has been a topic o...The impact of social media on mental health and well-being has been a topic o...
The impact of social media on mental health and well-being has been a topic o...
 
2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptx2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptx
 
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
 
The Benefits and Challenges of Open Educational Resources
The Benefits and Challenges of Open Educational ResourcesThe Benefits and Challenges of Open Educational Resources
The Benefits and Challenges of Open Educational Resources
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
 
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptxMatatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
 
Research Methods in Psychology | Cambridge AS Level | Cambridge Assessment In...
Research Methods in Psychology | Cambridge AS Level | Cambridge Assessment In...Research Methods in Psychology | Cambridge AS Level | Cambridge Assessment In...
Research Methods in Psychology | Cambridge AS Level | Cambridge Assessment In...
 
Industrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportIndustrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training Report
 
Gyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptxGyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptx
 
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
Operations Management - Book1.p  - Dr. Abdulfatah A. SalemOperations Management - Book1.p  - Dr. Abdulfatah A. Salem
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
 
Open Educational Resources Primer PowerPoint
Open Educational Resources Primer PowerPointOpen Educational Resources Primer PowerPoint
Open Educational Resources Primer PowerPoint
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
Keeping Your Information Safe with Centralized Security Services
Keeping Your Information Safe with Centralized Security ServicesKeeping Your Information Safe with Centralized Security Services
Keeping Your Information Safe with Centralized Security Services
 

ch7

  • 1. Chapter 7: Relational Database Design
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7. A Lossy Decomposition 7.7 Database System Concepts - 5 th Edition, July 28, 2005.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45. BCNF Decomposition Algorithm result := { R }; done := false; compute F + ; while (not done) do if (there is a schema R i in result that is not in BCNF) then begin let    be a nontrivial functional dependency that holds on R i such that   R i is not in F + , and    = ; result := ( result – R i )  ( R i –  )  (,  ); end else done := true; Note: each R i is in BCNF, and decomposition is lossless-join. 7.45 Database System Concepts - 5 th Edition, July 28, 2005.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.
  • 52.
  • 53. 3NF Decomposition Algorithm Let F c be a canonical cover for F; i := 0; for each functional dependency    in F c do if none of the schemas R j , 1  j  i contains   then begin i := i + 1; R i :=   end if none of the schemas R j , 1  j  i contains a candidate key for R then begin i := i + 1; R i := any candidate key for R; end return (R 1 , R 2 , ..., R i ) 7.53 Database System Concepts - 5 th Edition, July 28, 2005.
  • 54.
  • 55.
  • 56.
  • 57.
  • 58.
  • 59.
  • 60.
  • 61.
  • 62.
  • 63.
  • 64.
  • 65.
  • 66.
  • 67. 4NF Decomposition Algorithm result: = { R }; done := false; compute D + ; Let D i denote the restriction of D + to R i while ( not done ) if (there is a schema R i in result that is not in 4NF) then begin let    be a nontrivial multivalued dependency that holds on R i such that   R i is not in D i , and ; result := ( result - R i )  ( R i - )  (, ); end else done := true; Note: each R i is in 4NF, and decomposition is lossless-join 7.67 Database System Concepts - 5 th Edition, July 28, 2005.
  • 68.
  • 69.
  • 70.
  • 71.
  • 72.
  • 73.
  • 74.
  • 75.
  • 77. Proof of Correctness of 3NF Decomposition Algorithm
  • 78.
  • 79.
  • 80.
  • 81.
  • 82. Figure 7.5: Sample Relation r 7.82 Database System Concepts - 5 th Edition, July 28, 2005.
  • 83. Figure 7.6 7.83 Database System Concepts - 5 th Edition, July 28, 2005.
  • 84. Figure 7.7 7.84 Database System Concepts - 5 th Edition, July 28, 2005.
  • 85. Figure 7.15: An Example of Redundancy in a BCNF Relation 7.85 Database System Concepts - 5 th Edition, July 28, 2005.
  • 86. Figure 7.16: An Illegal R 2 Relation 7.86 Database System Concepts - 5 th Edition, July 28, 2005.
  • 87. Figure 7.18: Relation of Practice Exercise 7.2 7.87 Database System Concepts - 5 th Edition, July 28, 2005.