NORMALIZATION:
Normalization is a scientific method of Breaking Down Complex table structure into simple table structure by using certain rule. We can, therefore, reuse redundancy in a table and eliminate the problem of inconsistency and disk usages. We can also ensure that there is no loss of information.
Normalization is a scientific method of Breaking Down Complex table structure into simple table structure by using certain rule. We can, therefore, reuse redundancy in a table and eliminate the problem of inconsistency and disk usages. We can also ensure that there is no loss of information.
Normalization result in the formation of table that certify certain specified rule and represent certain normal form. The normal from are used to ensure that various type of anomalies and inconsistency are not introduced in the database. A table structure is always certain normal form. Several Normal Form never been identified. The most important and wiedly use normal form are------
1.1NF(Fast normal form)
2.2NF(second normal form)
3.3NF(third normal form)
4.BCNF(Boyce-code normal form)
3.3NF(third normal form):
A table said to be 3NF when it is in 2NF and every non-key attribute is functionally dependent only on the primary key.
for example constant the following table employee
In above table E-CODE is primary key. For each value E-CODE, there is exact on value of department. Hence, the attribute department is functional dependent on the primary key E-CODE. Similarly, for each value E-CODE, there is example of Department Head.Hence, Department Head is fully functionally dependent on primary key E-CODE. Hence, all the attribute are functionally dependent on are hole key E-CODE,Hence the table is in 2NF.
However,the attribute Department Head if the dependent on the attribute department also. As per 3NF rule, all non key attribute have not to be functionally dependent only on the primary key.Hence this table is not in 3NF, Since Department Head is functionally dependent on department, which is not a primary key.
So we convert the above table after applying 3NF rule-----------
4.BCNF(Boyce-code normal form):
A relation is said to be BCNF if and only if every determine is a candidate key.
Normalization is a scientific method of Breaking Down Complex table structure into simple table structure by using certain rule. We can, therefore, reuse redundancy in a table and eliminate the problem of inconsistency and disk usages. We can also ensure that there is no loss of information.
Normalization result in the formation of table that certify certain specified rule and represent certain normal form. The normal from are used to ensure that various type of anomalies and inconsistency are not introduced in the database. A table structure is always certain normal form. Several Normal Form never been identified. The most important and wiedly use normal form are------
1.1NF(Fast normal form)
2.2NF(second normal form)
3.3NF(third normal form)
4.BCNF(Boyce-code normal form)
1.1NF(Fast normal form):
A table is said to be in the 1NF when each cell of the table contains precisely one value.
For example consider the following table student
In above table the data is not normalize because the cells in department and student name more then one value,by applying the 1NF definition to the project table, we arrive at the following table----
2.2NF(second normal form):
A table is said to be in 2NF when it is in 1NF and every attribute in the row is functionally dependent upon the hole key, and not just part of the key.
For example consider the following table project
In above table E-CODE+ PROJECT CODE is composite primary key. The table specify is the definition of the 1nf because each cell table content one value but for each value of E-CODE, there is more then on value of duration. Duration is not functionally dependent on E-CODE similarly for each value of PROJECT CODE, there is more than one value of duration. Hymns duration is not functional dependent on PROJECT CODE. However, for a combination of the E-CODE and PROJECT CODE value, there is exactly one value of the duration. Hence the attribute duration is functionally dependent on the hole key E-CODE+ PROJECT CODE. For each value of E-CODE, there is exactly one value of department. Themes department is the functional dependent on E-CODE which is also part of the composite primary key. Similarly for each value of project code, there is more than one value of department. Hence, department is not functionally dependent on their attribute project code. Department is also functionally dependent on the hole key because for each value of department there is exact on value on the combination E-CODE+ PROJECT CODE value. Hence the table is not into 2NF.
To convert the above table after applying 2NF rule on project table-----------
A table said to be 3NF when it is in 2NF and every non-key attribute is functionally dependent only on the primary key.
for example constant the following table employee
In above table E-CODE is primary key. For each value E-CODE, there is exact on value of department. Hence, the attribute department is functional dependent on the primary key E-CODE. Similarly, for each value E-CODE, there is example of Department Head.Hence, Department Head is fully functionally dependent on primary key E-CODE. Hence, all the attribute are functionally dependent on are hole key E-CODE,Hence the table is in 2NF.
However,the attribute Department Head if the dependent on the attribute department also. As per 3NF rule, all non key attribute have not to be functionally dependent only on the primary key.Hence this table is not in 3NF, Since Department Head is functionally dependent on department, which is not a primary key.
So we convert the above table after applying 3NF rule-----------
A relation is said to be BCNF if and only if every determine is a candidate key.
0 Comments
Post a Comment