Database develop. life cycle - Redundancy &Anomalies

1. Data Redundancy

  • Redundancy means storing the same data multiple times in a database.

  • It wastes storage and can cause inconsistencies if updates are not applied everywhere.

Example (un-normalized table):

StudentID StudentName Course Instructor
101 Alice DBMS Prof. Rao
102 Bob DBMS Prof. Rao
103 Charlie DBMS Prof. Rao
  • The instructor “Prof. Rao” and the course “DBMS” are repeated for every student enrolled.

  • That repetition is redundancy.


2. Anomalies

Anomalies are problems that occur due to redundancy when inserting, updating, or deleting records.

a) Insertion Anomaly

  • You cannot insert some data because other data is missing.

  • Example: If a new course AI is introduced but no student has enrolled yet, we cannot insert (AI, Instructor) into the above table without leaving StudentID blank (which is not allowed).

b) Update Anomaly

  • If redundant data exists, updating it in one place but not everywhere causes inconsistency.

  • Example: If Prof. Rao changes department, we must update every row where his name appears. If we miss one row, the database becomes inconsistent.

c) Deletion Anomaly

  • Deleting some data may accidentally remove other valuable information.

  • Example: If the last student enrolled in DBMS (say Charlie) is deleted, then we also lose information about the fact that Prof. Rao teaches DBMS.


Summary

  • Redundancy = repeated data.

  • Anomalies = problems caused by redundancy:

    • Insertion anomaly

    • Update anomaly

    • Deletion anomaly