Download presentation
Presentation is loading. Please wait.
1
1 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Chapter 5 Database Design: Normalization
2
2 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Objectives Discuss functional dependence Define first normal form, second normal form, and third normal form Describe the problems associated with tables (relations) that are not in first normal form, second normal form, or third normal form along with the mechanism for converting to all three
3
3 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Objectives Discuss the problems associated with incorrect conversions to third normal form Define fourth normal form Describe the problems associated with tables (relations) that are not in fourth normal form and describe the mechanism for converting to fourth normal form
4
4 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Functional Dependence Column B is functionally dependent on Column A if A’s value determines a single value for B at a given time Given A, a single value for B can be determined
5
5 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Functional Dependence Example Rep Table Where LastName can determine record Rep Table Where LastName cannot determine record
6
6 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Keys Column(s) C is primary key for table T if: Property 1: All columns in T are functionally dependent on C Property 2: No subcollection of columns in C (assuming C is a collection of columns and not just a single column) also has Property 1 Candidate Keys Column(s) on which all other columns in table are functionally dependent Alternate Keys Candidate keys not chosen as primary keys
7
7 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski First Normal Form (1NF) Unnormalized table Contains a repeating group Table in 1NF Contains no repeating groups Removal of repeating groups is starting point in quest for problem-free tables
8
8 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski 1NF Example Unnormalized Table
9
9 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski 1NF Example (con’t.) Conversion to 1NF
10
10 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Second Normal Form (2NF) 1NF Tables may contain problems Redundancy Update Anomalies à Update, inconsistent data, additions, deletions à Occur because a column is dependent on a portion of a multi-column primary key 2NF Table In 1NF and no nonkey column is dependent on only a portion of the primary key
11
11 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Dependency Diagram for Orders 2NF Example
12
12 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski 2NF Example
13
13 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Third Normal Form (3NF) 2NF Tables may still contain problems Redundancy and wasted space Update Anomalies à Update, inconsistent data, additions, deletions à Occur because a column is dependent on a portion of a multi-column primary key 3NF Table In 2NF and the only determinants contained are candidate keys
14
14 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Customers Dependency Diagram
15
15 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski 3NF Example
16
16 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski 3NF Example
17
17 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Incorrect Decomposition Example
18
18 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Incorrect Decomposition Example
19
19 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski 2nd Incorrect Decomposition Figure 5.14a
20
20 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski 2nd Incorrect Decomposition
21
21 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Fourth Normal Form (4NF) 3NF Tables may still contain problems Dependencies Update Anomalies à Update, additions, deletions à Occur because of multivalued dependencies 4NF Table In 3NF and has no multivalued dependencies
22
22 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Incorrect 4NF Example
23
23 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski 4NF Example
24
24 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Normal Forms
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.