Disadvantages of Redundant Data
- Increased storage requirements: Redundant data takes up additional storage space within the database, which can increase costs and slow down performance.
- Inconsistency: If the same data is stored in multiple places within the database, there is a risk that updates or changes made to one copy of the data may not be reflected in other copies, leading to inconsistency and potentially incorrect results.
- Difficulty in maintenance: With redundant data, it becomes more difficult to maintain the accuracy and consistency of the data. It requires more effort and resources to ensure that all copies of the data are updated correctly.
- Increased risk of errors: When data is redundant, there is a greater risk of errors in the database. For example, if the same data is stored in multiple tables, there is a risk of inconsistencies between the tables.
- Reduced flexibility: Redundancy can reduce the flexibility of the database. For example, if a change needs to be made to a particular piece of data, it may need to be updated in multiple places, which can be time-consuming and error-prone.
The Problem of Redundancy in Database
Redundancy means having multiple copies of the same data in the database. This problem arises when a database is not normalized. Suppose a table of student details attributes is: student ID, student name, college name, college rank, and course opted.
Student_ID | Name | Contact | College | Course | Rank |
---|---|---|---|---|---|
100 | Himanshu | 7300934851 | GEU | B.Tech | 1 |
101 | Ankit | 7900734858 | GEU | B.Tech | 1 |
102 | Ayush | 7300936759 | GEU | B.Tech | 1 |
103 | Ravi | 7300901556 | GEU | B.Tech | 1 |
It can be observed that values of attribute college name, college rank, and course are being repeated which can lead to problems. Problems caused due to redundancy are:
Insertion Anomaly
If a student detail has to be inserted whose course is not being decided yet then insertion will not be possible till the time course is decided for the student.
Student_ID | Name | Contact | College | Course | Rank |
---|---|---|---|---|---|
100 | Himanshu | 7300934851 | GEU | 1 |
This problem happens when the insertion of a data record is not possible without adding some additional unrelated data to the record.
Deletion Anomaly
If the details of students in this table are deleted then the details of the college will also get deleted which should not occur by common sense. This anomaly happens when the deletion of a data record results in losing some unrelated information that was stored as part of the record that was deleted from a table.
It is not possible to delete some information without losing some other information in the table as well.
Updation Anomaly
Suppose the rank of the college changes then changes will have to be all over the database which will be time-consuming and computationally costly.
Student_ID | Name | Contact | College | Course | Rank |
---|---|---|---|---|---|
100 | Himanshu | 7300934851 | GEU | B.Tech | 1 |
101 | Ankit | 7900734858 | GEU | B.Tech | 1 |
102 | Ayush | 7300936759 | GEU | B.Tech | 1 |
103 | Ravi | 7300901556 | GEU | B.Tech | 1 |
All places should be updated, If updation does not occur at all places then the database will be in an inconsistent state.
Redundancy in a database occurs when the same data is stored in multiple places. Redundancy can cause various problems such as data inconsistencies, higher storage requirements, and slower data retrieval.