Functional Dependency

Functional Dependency in Normalisation :


Before we begin let us know why we need normalisation.  To overcome anomalies we go for normalisation. There are three kinds of anomalies that can appear in DBMS.

1) Insertion Anomaly

2) Deletion Anomaly

3) Updation Anomaly

To read more about Anomalies read this Anomalies

Let us define Functional Dependency

if for any tuple t1 and t2

                                  if t1[A]==t2[A] then
                                          t2[B] should be equal to t1[B].


Let us take an example

A                 B             C           

1                 Arun         3

2                 Raju          4

3                 Arun         3

4                 Raju          4

5                 Ram          5


From the above table we say that B->C. 


B functionally determines C. C is functionally dependent on B.


Because for all values of B C value is same i.e., Arun =>3 through out the table. Likewise for Raju=>4 and Ram=>5.

So B functionally determines C.

Comments

Popular posts from this blog

Super and Candidate Key

Anomalies In detail

Canonical Cover