Vous êtes sur la page 1sur 2

Introduction to Normalisation

Suppose we have many entities so we create tables for each entity. Now isn’t it possible that we
create a big table which contains all the attributes of all these many entities. Although It is possible
to create a big table, but we face some anomalies (i.e. problems) which will be associated with the
table which are as follows: 1.) insertion anomaly 2.) Deletion anomaly 3.) Updation anomaly.

Now If we want these anomaly not to occur then we must have to divide the table which is either big
or small in way that it only contains certain attributes. This process of dividing the table so that it
contain certain attributes is called Normalisation . And In Order to do Normalisation we use
Functional Dependency and Candidate Key .

Note: If a table contain only two attributes then it is the best form of table without an anomaly. This
table is also called as Boycott Normal Form .

Introduction to Functional Dependencies

Suppose we have three attributes in the table i.e. A, B, C and it is given that A is a candidate key, then
with the value of A we can identify the value of B and C also.

So In one way we can write it like this: A -> BC. So writing this way is called Functional Dependency
means If we give a value to A we can uniquely identify the value of B and C respectively .

One another way to write it as: if t1(A) = t2(A), then t1(BC) = t2(BC) means if
attribute A of tuple t1 and tuple t2 have the same value then the attribute B, C of tuple t1 and
tuple t2 are also having the same value because B and C are functionally Dependent on A
because A is a Candidate key. We read A-> BC as A determines BC, or BC is functionally
dependent on A.

• Functional Dependencies say what are some areas that can be minimized further
which is also called as Decompositon .

• Suppose In the table A is repeated 100 times then since B and C are functionally
dependent on A it is also repeated 100 times with the same value. So to save the
space we create a new table where we write the value of A, B and C one time.

• Our final aim is to see that The attribute which is determining is going to act as
the primary key for a new table which is also called as BCNF. Now In order to
reach at our final aim i.e. BCNF we go through various levels of normalization
where 1st level is 1st Normal Form, 2nd level is 2nd Normal form, then 3rd Normal
form and then BCNF.

• Now In order to go though these normal forms we use functional dependencies


and Candidate keys.

There are various types of functional dependencies:

In general if we write X->Y means X determines Y. Now X and Y here can be subset or collection of
attributes means X and Y need not be single symbols may be it can be like this ABC->DEF. And Now
based on what does this X and Y contains we are classifying this functional dependencies into three
types:

• Trivial functional dependencies.

• Given the value of A we have to find the value of A i.e. A->A it is nonsense.

• When X is superset of Y.

• Non-Trivial functional dependencies

• If there is nothing common in determining and determined attribute then it is called


Non Trivial functional dependencies.

• Means X and Y doesn’t have intersection part.

• For eg. A->B

A->BC

AB->CD

• Semi-Non Trivial functional dependencies

• If there is something common in determining and determined attribute then it is


called Semi-Non Trivial functional dependencies.

• Means AB->B i.e. here B is Common in both determining (i.e. AB) and determined
attribute (i.e. B). So here AB->B is a Semi-Non Trivial functional dependency.

Also visit our following Websites:

Gadgets and Technology Blog: https://techchahiye.com

News and Lifestyle Blog: https://satyawaadi.com

Core Computer Science Blog: https://theartofcomputerscience.com

Vous aimerez peut-être aussi