2nd and 3rd Normals
Posted in 1996
Once upon a time, there was a young and keen computer person who thought he knew "things". Then as time went by, each one of the "things" he knew turned out to be wrong, or at least, not quite the whole story. After many years of disappointment and disillusions, the not-quite-so-young computer person gave up knowing "things" and started saying sentences that began with "That very much depends on...", and "You need to take a lot of variables into account before you...". It was then that he knew it was time to venture forth into the world as a *consultant*. Unfortunately, the now-rapidly-aging computer person got a couple of good customers that trusted him, and he was once again succumbed by the dark side of the industry, and began to know "things" once more. Alas! That person was me, and I thought I knew what the 2nd and 3rd Normal forms of a Relational Database were......but no. Recent conversations with ArchDBAs have torn up my preconceived ideas, and I have come to you, the bodyless collective, for enlightenment. So, on with the question. Forgetting the book definition, and talking in real terms, I have always believed that the 2nd normal form of a DB is where every column in a record is dependant on the primary key. For example, in an order file, where the primary key is Order Number, a column called Customer number is in the second normal form if there is a "business dependancy" between the order number and the customer number. The DB would not be in 2nd normal if the customer number had nothing to do with order number (hard to imagine) or if the customer number/order number pair was already held in another table making the instance in the order file redundant. For 3rd normal, each non key column in the table (not primary or foreign) has to be dependant on the primary key only. For example, if our order file contained stock number, and stock description, then it could be said that stock description is functionaly linked to the order number but also to the stock number, and therefore the table in not 3rd normal. Can anyone clarify this for me? Bryan Tonnet batonnet@zeta.org.au