Explain insertion, deletion and update anomalies that may occur in an unnormalized database.
5 marks
Question source
- Exam year
- 2083 BS / 2026 AD
- Level
- Fifth Level
- Paper
- Paper II – Information Technology and Management
- Section
- Section B: Medium Answer Questions
Model answer
Database Anomalies in Unnormalized Tables
Database anomalies are problems that arise when a database table is poorly designed — specifically when it is not normalized and contains redundant data by mixing multiple entities in a single table.
Consider this unnormalized table storing employee and department data:
Employee Table (unnormalized):
| EmpID | EmpName | DeptID | DeptName | DeptLocation | DeptManager |
|---|---|---|---|---|---|
| 101 | Ram Thapa | D01 | Accounts | Kathmandu | Sita Sharma |
| 102 | Hari Lama | D01 | Accounts | Kathmandu | Sita Sharma |
| 103 | Gita Karki | D02 | IT | Lalitpur | Raju Pande |
| 104 | Mina KC | D01 | Accounts | Kathmandu | Sita Sharma |
1. Insertion Anomaly
An insertion anomaly occurs when you cannot insert certain data without also inserting other, possibly unavailable data.
Example: Suppose a new department D03 (HR, Pokhara) has been created but no employee has been assigned yet. You cannot insert this department into the table because there is no EmpID to fill in — EmpID being the primary key, a row cannot exist without it.
Consequence: New departments (or other entity data) cannot be recorded until at least one employee is assigned, creating a data gap.
2. Deletion Anomaly
A deletion anomaly occurs when deleting a record unintentionally destroys other needed information.
Example: Employee 103 (Gita Karki) is the only employee in Department D02 (IT, Lalitpur). If Gita Karki leaves and her record is deleted, the information about the IT department (its location "Lalitpur" and manager "Raju Pande") is also lost permanently — even though the department itself still exists.
Consequence: Deleting one type of data accidentally destroys logically separate data.
3. Update Anomaly
An update anomaly (also called modification anomaly) occurs when updating one piece of data requires updating multiple rows, and if any row is missed, the database becomes inconsistent.
Example: The manager of Department D01 (Accounts) changes from "Sita Sharma" to "Prem Adhikari." Because the manager's name appears in every row for D01 employees (rows for EmpID 101, 102, and 104), you must update all three rows. If only rows 101 and 102 are updated but row 104 is missed, the database now contains two different managers for the same department — an inconsistency.
Solution: All three anomalies are resolved through normalization (1NF, 2NF, 3NF), which separates the entities (Employee and Department) into distinct tables linked by a foreign key.