Quote:
|
Originally Posted by dbconcept
Hi
Can anyone let me know in detail the Following with Specific Example
1- First Normal Form
2- Second Normal Form
3-Third Normal Form
4- Fourth Normal Form
5- Fifth Normal Form
6- BCNF
Thanks
|
Ok take this example with explanation;
Let us take below table which is not normalized
Invoice (Invoive#,Cust#,Name,Address,Quant1,Part1,Amt1,Qua nt2,Part2,Amt2,Quant3Part3,Amt3)
INF: (One to many relationship and remove duplication of groups )
remove duplication of groups: (remove repeating group by making a new entity
Invoice (Invoive#,Cust#,Name,Address)
Items (Item#,Quant,Part,Amt)
One to many relationship: Put PK of one table to other table
Invoice (Invoive#,Cust#,Name,Address)
Items (Item#,Quant,Part,Amt,Invoice#)
Here it is 1 NF
2NF: (many to one relationship,Each column must depend on the entire primary key)
Invoice (Invoive#,Cust#)
Customer (Cust#,Name,Address)
Items (Item#,Quant,Part,Amt,Invoice#)
decompose table invoice into customer and Invoice. Here is many to one relationship. Copy PK from other table to main table.
Here it is 2 NF
3NF: (many to many relationship,Each column must depend on directly on the primary key)
So here only customer table and item table has many to many relationship
Invoice (Invoive#,Cust#)
Customer (Cust#,Name,Address)
Cust_Item (Cust#,Item#)
Items (Item#,Quant,Part,Amt,Invoice#)
this is 3NF
If I am Wrong plz seniors are welcome to correct me.