A quick summary of Database Normal Forms
So today in my study for exams, I worked out some simple ways of remembering up to Boyce-Codd normal form (BCNF).
- 1st Normal Form: All rows/tuples must have the same number of columns/attributes.
- 2nd Normal Form: Only applies to tables or schemas with composite keys, if it only has one key it is already in 2NF.
A non-key column value must be relevant to ALL column values of the composite key. For example: on the table (keys are bolded) [Part | Warehouse | Quantity | Warehouse Address] 2NF is violated as Warehouse Address is only related to Warehouse and not Part.
- 3rd Normal Form: A non-key column can only be related to a key column. Modifying the earlier example to; [Part | Warehouse | Warehouse Address] this violates 3NF as Warehouse Address is related to Warehouse, not Part.