Database normalization #
I find the description of the normal form unintuitive and I found it to be copied all over the web without explaining it well.
What is it? #
It is all about good database design and in which way it differs from what we are sometimes using tables for in print.
How is it archived? #
-
We want just one kind of information in each and every column. In a books keyword index, we do not want it sometimes referring to pages, sometimes to chapters. It is perfectly fine to use both methods as long as they do not get mixed up.
-
We do not want to repeat ourselfs. In a books keyword index, it is good practice to list each and any word just once.
-
We want direct links between the entries. Once we look up a word in a books keyword index, it would be nice to have another index telling us in which line the word appears on the page, rather than having to read the whole page in order to find it.
These three rules stacked together form the normalization, an instruction on how to simplify the representation of data (the order matters!).
# TODO
database examples
explain how a primary key differs from an indexed text