History
The second normal form was originally defined by E. F. Codd in 1971.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 24–25, 1971.) IBM Research Report RJ909 (August 31, 1971). Republished in Randall J. Rustin (ed.), ''Data Base Systems: Courant Computer Science Symposia Series 6''. Prentice-Hall, 1972.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: * There is a multi-attribute unique identifier/candidate key: "Manufacturer" and "Model". * is functionally dependent (predictable) on . * is a proper subset of the candidate key. * is not part of a candidate key, so it is a non-prime attribute. (It is assumed that it is possible for two manufacturers in the same country to make a toothbrush with the same model name, so is not a candidate key even though in the current table the pair uniquely identify rows.) In other words, since 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: # Remove the functionally dependent attributes in the partial dependencies of the first normal form relation. In this example, is the functionally dependent attribute which will be removed. # Place those partial dependency-dependent attributes (i.e. ) in a relation where their corresponding determinant attributes are a candidate key (i.e. ). As seen below, 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 in this table to be used as the candidate key of the table.See also
* Attribute-value system * First normal form (1NF) * Third normal form (3NF) * Fourth normal form (4NF) * Fifth normal form (5NF) * Sixth normal form (6NF)References
Further reading
External links