Normalization of Database Tables
Normalization of Database Tables
Normalization of Database Tables
10
Relational table must not contain repeating groups Normalizing table structure will reduce data redundancies Normalization is three-step procedure
11
12
13
14
16
All relational tables satisfy 1NF requirements Some tables contain partial dependencies
Dependencies based on only part of the primary key Sometimes used for performance reasons, but should be used with caution Still subject to data redundancies
17
18
19
20
21
22
23
24
26
27
28
30
31
32
33
When table contains only one candidate key, the 3NF and the BCNF are equivalent BCNF can be violated only when table contains more than one candidate key
34
36
37
38
40
41
42
Difficult to separate normalization process from ER modeling process Two techniques should be used concurrently
44
45
46
47
48
49
Denormalization
Creation of normalized relations is important database design goal Processing requirements should also be a goal If tables decomposed to conform to normalization requirements:
Number of database tables expands
50
Denormalization (continued)
Joining the larger number of tables takes additional input/output (I/O) operations and processing logic, thereby reducing system speed Conflicts between design efficiency, information requirements, and processing speed are often resolved through compromises that may include denormalization
51
Denormalization (continued)
Unnormalized tables in production database tend to suffer from these defects:
Data updates are less efficient because programs that read and update tables must deal with larger tables Indexing is more cumbersome Unnormalized tables yield no simple strategies for creating virtual tables known as views
52
Denormalization (continued)
Use denormalization cautiously Understand whyunder some circumstancesunnormalized tables are better choice
53
Summary
Normalization is technique used to design tables in which data redundancies are minimized First three normal forms (1NF, 2NF, and 3NF) are most commonly encountered Table is in 1NF when all key attributes are defined and when all remaining attributes are dependent on primary key
54
Summary (continued)
Table is in 2NF when it is in 1NF and contains no partial dependencies Table is in 3NF when it is in 2NF and contains no transitive dependencies Table that is not in 3NF may be split into new tables until all of the tables meet 3NF requirements Normalization is important partbut only partof design process
55
Summary (continued)
56
Summary (continued)
57
Summary (continued)
58
Summary (continued)
Table in 3NF may contain multivalued dependencies that produce either numerous null values or redundant data It may be necessary to convert 3NF table to fourth normal form (4NF) by
Splitting table to remove multivalued dependencies
Tables are sometimes denormalized to yield less I/O which increases processing speed
59