Eroxl's Notes
Second Normal Form
aliases
2NF

Second normal form is a normal form used in database normalization. Second normal form requires that a schema is in 1NF and that every non-key attribute is fully functionally dependent on the entire primary key, meaning no non-key attribute depends on only part of a composite key.

Definition

A schema is in second normal form if:

Example

Consider a table Toothbrush with the following attributes

  • Manufacturer
  • `Model
  • ManufacturerCountry

and the following functional dependencies

  • Manufacturer, Model ManufacturerCountry
  • Manufacturer ManufacturerCountry

Is Toothbrush in 2NF? Justify why or why not and if it isn't decompose it such that it is.

Toothbrush is not in 2NF because ManufacturerCountry is only dependent on Manufacturer not on Model. To reconcile this we decompose it into two new tables

Toothbrush with the following attributes

  • Manufacturer
  • `Model

and Manufacturer

  • Manufacturer
  • ManufacturerCountry