In the previous post, we learn about the constraints of the database, You can review it again:
Staircase of Database
Basic Knowledge about Normalization
I hope it is clear to you. Now, Let’s have a basic knowledge about NORMALIZATION.
Starting with its basics here we go…
Normalization used to reduce the redundancy from the databases/ database table. Before going to the details we need to know why this is necessary. As discussed above to remove redundancy and also to reduce the main three anomalies:
These type of anomaly arises due to the absence of the data in a particular database. From this, we meant to say that to insert data in the database becomes difficult because of insertion anomaly.
For example, When a student gets admission in a college and the hostel is not assigned to it. Then this student can’t be registered or entered in that hostel database.This happens due to an omission in the data and it creates the inconsistency.
Update or Modification Anomalies:
An update anomaly is a data inconsistency that results from data redundancy and a partial update or we can also say that it arises when the same data need to be updated more than once.
For example, Each employee in a company has a department associated with them as well as the student group they participate in. So when the data is updated in department table but not in student table then it generates inconsistency.
In another case, If ABC’s department has an error it must be updated at least 2 times or there will be inconsistent data in the database. If the user performing the update does not realise the data is stored redundantly the update will not be done properly.
A deletion anomaly is the unintended loss of data due to deletion of other data i.e. when we want to delete the data of one table but forget to remove it from other then deletion anomaly arises.
For example, if the student group ‘A’ disbanded and was deleted from the table, Sports and the Accounting department would cease to exist, this results in database inconsistencies.
- Update, deletion, and insertion anomalies are very undesirable in any database. Anomalies are avoided by the process of normalisation.
Functional dependency can be said as the constraint between attributes of the table or we can say that how one attribute depends on other.
The constraint which describes the relationship between them is termed as Functional Dependency. The values of the Y component of a tuple in r depend on or are determined by, the values of the X component. Alternatively, the values of the X component of a tuple uniquely (or functionally) determine the values of the Y component.
We also say that there is a functional dependency from X to Y, or that Y is functionally dependent on X. The abbreviation for functional dependency is FD or f.d. the set of attributes X is called the left-hand side of the FD, and Y is called the Right-hand side.