1 WID-008 Green Widget |
Data is presented in a single column. In tis caste the following data is contained:
Quantity, Item ID and item Description. Since multiple unrelated values are stored in a column, this data is considered un-normalised.
ItemCode | Description | Quantity |
WID-008 | Green Widget | 1 |
Data is now in First Normal Form (1NF). Data items have been put in their own columns, and the columns furnished with a description. For data to be in 1NF each piece of information should be in its own column,and each row of data should contain the same columns.
OrderID | ItemCode | Description | Quantity |
2345 | WID-008 | Green Widget | 1 |
Data is now in Second Normal Form (2NF). 2NF is based on 1NF, with the addition that a unique identifier is added to each row - In this case the OrderID value. In most cases this unique value is a counter, rather than being related to the data. Each non-key attribute should be functionally dependent on the primary key for the table.
OrderID | ItemCode | Quantity |
2345 | WID-008 | 1 |
ItemCode | Description |
WID-008 | Green Widget |
Data is now in Third Normal Form (3NF). All attributes not dependent on the primary key should be moved to a separate table. Repetition of data is also eliminated. In this case, the tables are linked by the ItemCode attribute.