Redundancy in DBMS
In this article, we will learn about redundancy in DBMS. First, let us understand data redundancy.
Data redundancy means the occurrence of duplicate copies of similar data. It is done intentionally to keep the same piece of data at different places, or it occurs accidentally.
What is Data redundancy in the database management system?
In DBMS, when the same data is stored in different tables, it causes data redundancy.
Sometimes, it is done on purpose for recovery or backup of data, faster access of data, or updating data easily. Redundant data costs extra money, demands higher storage capacity, and requires extra effort to keep all the files up to date.
Sometimes, unintentional duplicity of data causes a problem for the database to work properly, or it may become harder for the end user to access data. Redundant data unnecessarily occupy space in the database to save identical copies, which leads to space constraints, which is one of the major problems.
Let us understand redundancy in DBMS properly with the help of an example.
In the above example, there is a "Student" table that contains data such as "Student_id", "Name", "Course", "Session", "Fee", and "Department". As you can see, some data is repeated in the table, which causes redundancy.
Problems that are caused due to redundancy in the database
Redundancy in DBMS gives rise to anomalies, and we will study it further. In a database management system, the problems that occur while working on data include inserting, deleting, and updating data in the database.
We will understand these anomalies with the help of the following student table:
1. Insertion Anomaly:
Insertion anomaly arises when you are trying to insert some data into the database, but you are not able to insert it.
Example: If you want to add the details of the student in the above table, then you must know the details of the department; otherwise, you will not be able to add the details because student details are dependent on department details.
2. Deletion Anomaly:
Deletion anomaly arises when you delete some data from the database, but some unrelated data is also deleted; that is, there will be a loss of data due to deletion anomaly.
Example: If we want to delete the student detail, which has student_id 2, we will also lose the unrelated data, i.e., department_id 102, from the above table.
3. Updating Anomaly:
An update anomaly arises when you update some data in the database, but the data is partially updated, which causes data inconsistency.
Example: If we want to update the details of dept_head from Jaspreet Kaur to Ankit Goyal for Dept_id 104, then we have to update it everywhere else; otherwise, the data will get partially updated, which causes data inconsistency.
Advantages of data redundancy in DBMS
Disadvantages of data redundancy in DBMS
How to reduce data redundancy in DBMS
We can reduce data redundancy using the following methods: