DEV Community

loading...
Cover image for Normalization and Functional Dependencies in DBMS

Normalization and Functional Dependencies in DBMS

hebaShakeel
A Computer Science Student
・1 min read

Normalization is the process of removing redundant(repetition) data from your tables in order to:
1) improve storage efficiency
2) data integrity and
3) Scalability

Normalization is a technique to store data in database.

Anomalies(Problems) in DBMS:

1) Insert Anomaly: Data cannot be inserted into a table because of another data due to some sort of violation.
Alt Text

2) Update Anomaly:
Alt Text

3) Delete Anomaly: In an attempt to delete some data, other useful data also gets deleted.
Alt Text

Functional Dependencies :
1) If an attribute or a set of attributes identify the whole tuple(row / record) uniquely then we can say it is functionally dependent.

Alt Text
From this we can say X->Y (X functionally determines Y).
X : Determinant Attribute
Y : Dependent Attribute

Types of Functional Dependencies

(i) Trivial Functional Dependency:
If X->Y, and if Y is a subset of X, this is called a Trivial FD.
Examples:
1) A->A
2) A->phi
3) AB->B
4) ABC->ABC
5) ABCD->ACDB

(ii) Non-Trivial Functional Dependency:
If X->Y, and if Y is not a subset of X, this is called a Non-Trivial FD.
Examples:
1) A->BC
2) ABC->BD
3) MNP->JKL

Stay tuned for the next topic!
Thank You.

Discussion (0)

Forem Open with the Forem app