Posts

Showing posts with the label deletion anomaly

Normalization and Denormalization

Image
Introduction Data Anomalies Before diving into the main content of this article, we need to understand Data Anomalies, which are logical flaws or data discrepancies that occur in relational databases when proper table normalization has not been applied. This leads to information being stored repeatedly in a redundant manner. When data operations (Insert, Update, Delete) are performed, they cause the database to fall into an inconsistent state where data is correct in some places but incorrect in others. Data Anomalies are divided into 3 main types: Insertion Anomaly: Occurs when you cannot add a new record into the database because the system forces you to enter another piece of information that does not yet exist. Deletion Anomaly: Occurs when you delete one piece of information but accidentally lose another completely different and important piece of information. Update Anomaly: Occurs when a piece of information is repeated across too many rows. As a result, when you edit that infor...