0% found this document useful (0 votes)
111 views2 pages

Second Normal Form: 2NF and Candidate Keys

Second normal form (2NF) defines criteria for database tables to be considered normalized. For a table to be in 2NF, it must meet the criteria for 1NF and all non-prime attributes must depend on the entire candidate key, not just a part of it. An example table of electric toothbrush models is given that violates 2NF because the "Manufacturer Country" attribute depends on only part of a candidate key. The table is split into two tables to comply with 2NF.

Uploaded by

ruslan.browser
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
111 views2 pages

Second Normal Form: 2NF and Candidate Keys

Second normal form (2NF) defines criteria for database tables to be considered normalized. For a table to be in 2NF, it must meet the criteria for 1NF and all non-prime attributes must depend on the entire candidate key, not just a part of it. An example table of electric toothbrush models is given that violates 2NF because the "Manufacturer Country" attribute depends on only part of a candidate key. The table is split into two tables to comply with 2NF.

Uploaded by

ruslan.browser
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Second normal form

From Wikipedia, the free encyclopedia

Second normal form (2NF) is a normal form used in database normalization.


2NF was originally defined by E.F. Codd in 1971.[1]

A table that is in first normal form (1NF) must meet additional criteria if it is to
qualify for second normal form. Specifically: a table is in 2NF if it is in 1NF and no
non-prime attribute is dependent on any proper subset of any candidate key of the
table. A non-prime attribute of a table is an attribute that is not a part of any
candidate key of the table.

Put simply, a table is in 2NF if it is in 1NF and every non-prime attribute of the
table is dependent on the whole of every candidate key.

2NF and candidate keys


A functional dependency on part of any candidate key is a violation of 2NF. In
addition to the primary key, the table may contain other candidate keys; it is
necessary to establish that no non-prime attributes have part-key dependencies on
any of these candidate keys.

Multiple candidate keys occur in the following table:

Electric Toothbrush Models


Manufacturer Model Model Full Name Manufacturer Country
Forte X-Prime Forte X-Prime Italy
Forte Ultraclean Forte Ultraclean Italy
Dent-o-Fresh EZbrush Dent-o-Fresh EZbrush USA
Kobayashi ST-60 Kobayashi ST-60 Japan
Hoch Toothmaster Hoch Toothmaster Germany
Hoch X-Prime Hoch X-Prime Germany

Even if the designer has specified the primary key as {Model Full Name}, the
table is not in 2NF. {Manufacturer, Model} is also a candidate key, and
Manufacturer Country is dependent on a proper subset of it: Manufacturer. To
make the design conform to 2NF, it is necessary to have two tables:
Electric Toothbrush Manufacturers
Manufacturer Manufacturer Country
Forte Italy
Dent-o-Fresh USA
Kobayashi Japan
Hoch Germany

Electric Toothbrush Models


Manufacturer Model Model Full Name
Forte X-Prime Forte X-Prime
Forte Ultraclean Forte Ultraclean
Dent-o-Fresh EZbrush Dent-o-Fresh EZbrush
Kobayashi ST-60 Kobayashi ST-60
Hoch Toothmaster Hoch Toothmaster
Hoch X-Prime Hoch X-Prime

See also
Attribute-value system

References
1. Codd, E.F. "Further Normalization of the Data Base Relational Model." (Presented at
Courant Computer Science Symposia Series 6, "Data Base Systems," New York City,
May 24th-25th, 1971.) IBM Research Report RJ909 (August 31st, 1971).
Republished in Randall J. Rustin (ed.), Data Base Systems: Courant Computer
Science Symposia Series 6. Prentice-Hall, 1972.

You might also like