Anomalies are problems that can occur in poorly planned, un-normalized databases where all the data is stored in one table (a flat-file database).
Types Of Anomalies:
The three type of anomalies that can arise in the database because of redundancy are
- Modification/ Updation anomalies.
Consider a relation emp_dept with attributes:
This kind of a problem in the relation where some tuple cannot be inserted is known as insertion anomaly.
This kind of a problem in the relation where deletion of some tuples can lead to loss of some other data not intended to be removed is known as deletion anomaly.
Modification /update anomaly: Suppose the manager of a department has changed, this requires that the Dmgr# in all the tuples corresponding to that department must be changed to reflect the new status. If we fail to update all the tuples of the given department, then two different records of employee working in the same department might show different Dmgr# leading to inconsistency in the database.
This is known as modification/update anomaly. The data redundancy can not be totally removed from the database, but there should be controlled redundancy,
Consider a relation Student_report(S#, Sname, Course#, SubjectName, Marks) to store the marks of a student for a course having some optional subjects, but all the students might not select the same optional papers. Now the student name appears in every tuple, which is redundant and we can have two tables as
- Students(S#, Sname, CourseName)
- Report(S#, SubjectName, Marks).
However, if we want to print the mark-sheet for every student using these tables then a join operation, which is a costly operation, in terms of resources required to carry out, has to be performed in order to get the name of the student. So to save on the resource utilization, we might opt to store a single relation, students_report only.
|Karnaugh Mapping Procedure - Simplify Boolean Functions →|