Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

I know that BCNF is used for normalization and to reduce redundancy . but how we can apply it?

user-image
Question ajoutée par ahmad yassine , Business Development & Performance , Boubyan Bank
Date de publication: 2013/12/07
Gayasuddin Mohammed
par Gayasuddin Mohammed , Advocate , Practicing Law before High Court at Hyderabad

example:

Assume I have these field information should be have in the database for my employee system in place.

empCode  empName  mgrCode deptNo   deptName  deptLoc  deptNatureOfWork  empBrand empSalary

 

If i simply create one table with all those fields, I duplicate much data over there which is inefficient against normalization principle and cause redundancy.

if you split above fields into3 different tables called as Employee table, Department Table, Brand Table.

Now my Employee table contains only the below fields with empCode as Primary Key, and deptNo is foreign key referencing to Department table and empBrand is the foreign key referencing to Brand Table

empCode  empName  mgrCode deptNo  empBrand

 

Now my Department table contains the below fields making my deptNo is the primary key

deptNo   deptName  deptLoc  deptNatureOfWork, any other only related to department.

 

Now my Brand table contains the below fields making my brand is primary key here and the same is referring to the employee table empBrand which is a foreign key referrencing to this field.

brand SalaryForThisBrand DesgForThisBrand, etc like brand related only

 

now you can understand unnecessary unwanted repeat of the data is avoided there by no data redundancy. Hope I made it clear with the above example. Thanks.

More Questions Like This

Avez-vous besoin d'aide pour créer un CV ayant les mots-clés recherchés par les employeurs?