Definition+of+database+anomalies

Introduction
The problem with a flat-file database is that we can get update anomalies. The different types of anomaly are described below.

Insertion anomaly
An insertion anomaly means that it is difficult to insert new records into the database.

It was not possible to insert the details about Mr O'Hara because he was not part of any pupil record.

Update anomaly
An update anomaly occurs when the same data item has to be updated more than once. This can lead to errors and inconsistency of data.

Updating Miss Dewar's class required the data to be updated in 2 different places. In a larger database, the update may have had to have been performed numerous times.

Deletion anomaly
A deletion anomaly occurs when data is lost because of the deletion of other data.

If we delete John McGinn's record from the database, we are also deleting the fact that Mr Green teaches PE in PE Room 2