Contents
Second normal form
Second normal form (2NF), in database normalization, is a normal form. A relation is in the second normal form if it fulfills the following two requirements: Put simply, a relation (or table) is in 2NF if: If any regular (non-prime) attributes are predictable (dependent) on another (non-prime) attribute, that is addressed in third normal form.
History
The second normal form was originally defined by E. F. Codd in 1971.
Decomposition of 1NF into 2NF
To make a 1NF relation a 2NF relation, remove the functionally dependent attributes in the partial dependencies of the first normal form relation, and place those partial dependency dependent attributes in a relation where their corresponding determinant attributes are an entire candidate key.
Example
The following relation does not satisfy 2NF because: In other words, since {Manufacturer country} is a non-prime attribute functionally dependent on a proper subset of a candidate key, the relation is in violation of 2NF. To make the design conform to 2NF, it is necessary to have two relations. To create these relations: As seen below, {Manufacturer country} is removed from the original table: As seen below, the partial dependency is put into a new relation where the dependency can exist without being a partial dependency: It may now be desirable to add a numeric identifier to each row in the "Electric toothbrush models" table to ensure it remains in 1NF, or, the table may be left as is, allowing each unique combination of values in each row to be usable as a primary key, thus allowing the columns {Manufacturer, Model} in this table to be used as the candidate key of the table.
This article is derived from Wikipedia and licensed under CC BY-SA 4.0. View the original article.
Wikipedia® is a registered trademark of the
Wikimedia Foundation, Inc.
Bliptext is not
affiliated with or endorsed by Wikipedia or the
Wikimedia Foundation.