Sie sind auf Seite 1von 12

Chapter 4

Functional Dependencies and Normalization for Relational Databases

Copyright 2004 Pearson Education, Inc.

Achieving the BCNF by Decomposition (2)


Data normalization is a process in which data attributes within a data model are organized to increase the cohesion of entity types. In other words, the goal of data normalization is to reduce and even eliminate data redundancy, an important consideration for application developers because it is incredibly difficult to stores objects in a relational database that maintains the same information in several places.

Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition


Copyright 2004 Ramez Elmasri and Shamkant Navathe

Chapter 10-3

Table 1 summarizes the three most common forms of normalization First normal form (1NF), Second normal form (2NF), and Third normal form (3NF) describing how to put entity types into a series of increasing levels of normalization.
Rule An entity type is in 1NF when it contains no repeating groups of data. An entity type is in 2NF when it is in 1NF and when all of its non-key attributes are fully dependent on its primary key. An entity type is in 3NF when it is in 2NF and when all of its attributes are directly dependent on the primary key.
Chapter 10-4

Level
First normal form (1NF)

Second normal form (2NF)

Third normal form (3NF)

Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition


Copyright 2004 Ramez Elmasri and Shamkant Navathe

First Normal Form (1NF)


Lets consider an example. n entity type is in first normal form (1NF) when it contains no repeating groups of data. For example, in Figure 1 you see that there are several repeating attributes in the data Order0NF table

Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition


Copyright 2004 Ramez Elmasri and Shamkant Navathe

Chapter 10-5

Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition


Copyright 2004 Ramez Elmasri and Shamkant Navathe

Chapter 10-6

First normal form (1NF)

Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition


Copyright 2004 Ramez Elmasri and Shamkant Navathe

Chapter 10-7

Second Normal Form (2NF)

Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition


Copyright 2004 Ramez Elmasri and Shamkant Navathe

Chapter 10-8

. Third Normal Form (3NF)

. Third Normal Form (3NF)

Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition


Copyright 2004 Ramez Elmasri and Shamkant Navathe

Chapter 10-9

Beyond 3NF

Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition


Copyright 2004 Ramez Elmasri and Shamkant Navathe

Chapter 10-10

Why Data Normalization?


The advantage of having a highly normalized data schema is that information is stored in one place and one place only, reducing the possibility of inconsistent data.

Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition


Copyright 2004 Ramez Elmasri and Shamkant Navathe

Chapter 10-11

Furthermore, highly-normalized data schemas in general are closer conceptually to object-oriented schemas because the object-oriented goals. This generally makes it easier to map your objects to your data schema.

Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition


Copyright 2004 Ramez Elmasri and Shamkant Navathe

Chapter 10-12

Das könnte Ihnen auch gefallen