This is a common interview question. I faced one interview where the interviewer gave me one table and asked me tell him which normal form the table is in? If it's in ##NF, then normalize it to the next NF?
I'm always get confused between these normal forms of database.
Can anyone explain to me these normal forms with a proper example of how each NF is modeled into table so it will help in my next interview?
Boyce Codd Normal Form is really the most important and also the easiest to explain: Every non-trivial determinant is a superkey (just remember "arrows out of superkeys"). The lesser normal forms are only worth mentioning because BCNF is not dependency-preserving in a few cases.
Examples of BCNF and 5NF by Hugh Darwen:
- Database Design Issues: Part I
- Database Design Issues: Part II
For more mathematical definitions (Abiteboul et al):
- Foundations of Databases: The Logical Level