written 2.6 years ago by |
ANOMALIES
- Tables that have redundant data have problems known as anomalies. So data redundancy isacause of an anomaly.
- Redundancy is the duplication of the data.
There are 3 types of anomalies
1: Insert Anomaly: When you insert a record without having it stored on the related record
2: Delete Anomaly: When you delete some information and lose valuable related information at the same time.
3: Update Anomaly: Any change made to your data will require you to scan all records to make the changes multiple time.
Insert anomaly
An Insert Anomaly occurs when certain attributes cannot be inserted into the database without the presence of other attribute
For Example
e.g. we have builtanew room (e.g. B123) but it has not yet been timetabled for any courses or members of staff.
Delete Anomaly
A Delete Anomaly exists when certain attributes are lost because of the deletion of other attributes.
For Example
e.g. if we remove the entity, course_no:351 from the above table, the details of room C320 get deleted. Which implies the corresponding course will also get deleted.
Update Anomaly
An Update Anomaly exists when one or more instances of duplicated data is updated, but not all.
e.g. Room H940 has been improved, it is now of RSize=500. For updatinga single entity, we have to update all other columns where room=H940.