DML Anomalies and Functional Dependencies
- Discuss insertion, deletion, and modification anomalies. Why are they considered bad? Illustrate with examples.
- What is meant by the closure of a set of functional dependencies?
Sample Answer
Data Anomalies and Functional Dependencies
Data Anomalies
Data anomalies occur when inconsistencies arise in a database due to redundant or missing information. They can lead to data integrity issues, inaccurate reporting, and difficulty in maintaining data consistency.
Types of Anomalies:
- Insertion Anomaly: This occurs when it’s impossible to add new data to the database without also adding data to another related table. For instance, in a database without a separate table for customers, it would be impossible to store information about a customer until they make a purchase.