1.) Normalization in DBMS --
- The bad database design can contain anomalies which can be bad
for database administratior.
- The anomalies are as follows --
- insertion anomilies -- Trying to insert data
in a record that do not exist.
- Deletion anomilies -- Try to delete record but
but the related part left undeleted.
- Updation anomilies -- If you are trying to
update one data item having its copies left several palces and few
instances updated sucessfully and few left with old values.
- These instances cam make the datbase inconsistent.
2.) What is normalization --
- Normailization is process to minimize redudancy from set of
relation.
- Redudancy in relation can contain insertion, updation and
deletion. and normalization is used for mainly two purpose --
eliminating useless data and enusuring data is logically
stored.
- The Normalization rules are divided into
following normal forms in database --
- First Normal Form (1NF)
- Second Normal Form (2NF)
- Third Normal Form (3NF)
- BCNF
- Fourth Normal Form
3.) Apply normalizations rules to DBMS --
- First Normal Form (1NF) --
- First normal form contain single value attribute/column
- The value which is stored in the column should be of same
domain
- The columns in the table should unique names
- Second Normal Form (2NF) --
- It should be in first normal forms
- and should not contain partial dependency
- Third Normal Form (3NF) --
- It is in second normal forms.
- And should not contain Transitive Dependency.
- BCNF --
- BCNF stands for Boyce and codd normal form. it is higher
version of third normal form.
- And BCNF can handle the anomaly that can not be handled by
3NF.
- The 3NF table which do not contain multiple overlapping
candidate keys is said to be in BCNF.
- Fourth Normal Form --
- The fourth normal form is in the BCNF form.
- and it do not contain multi-valued dependency.
4.) Example of normalization in DBMS --
- Example of 1NF --
-
stud_id |
stud_name |
Course |
1 |
Amit |
c1 |
1 |
Amit |
c2 |
2 |
Mohan |
c3 |
3 |
Raju |
c2 |
3 |
Raju |
c3 |
- Example of 2NF --
- Table -1
-
stud_id |
Course_id |
1 |
c1 |
2 |
c2 |
1 |
c4 |
4 |
c3 |
4 |
c1 |
-
Table - 2
-
Course_id |
Course_fee |
c1 |
4000 |
c2 |
3000 |
c3 |
8000 |
c4 |
1500 |
c5 |
8600 |