AQU Course (2): Database System Design
Unnormalized data refers to a database that hasn't undergone normalization and therefore may contain data redundancy, inconsistency, and other issues. These issues are known as data anomalies, and they can cause significant problems in a database's operation and maintenance.
Insertion Anomaly
Unnormalized data refers to a database that hasn't undergone normalization and therefore may contain data redundancy, inconsistency, and other issues. These issues are known as data anomalies, and they can cause significant problems in a database's operation and maintenance. There are three primary types of anomalies in unnormalized data:
1. Insertion Anomaly
Definition: An insertion anomaly occurs when the database schema forces you to insert redundant data or prevents you from inserting data at all due to the absence of some other data.
Example: Consider a table storing student information along with the courses they are enrolled in:
|
StudentID |
StudentName |
Course |
Instructor |
|
1 |
Alice |
Math |
Dr. Smith |
|
2 |
Bob |
Science |
Dr. Jones |
Issue: If a new course is introduced but no students have enrolled in it yet, you might be forced to insert a null value for StudentID and StudentName, or you might not be able to insert the course at all.
Impact: This could lead to incomplete or incorrect data in the database, making it difficult to maintain and query.