Lecture 3.1.1 Anomalies
Lecture 3.1.1 Anomalies
UNIT-3
Bachelor of Computer Applications
Database Management System
(23CAT-251/23SCT-251)
Slide 10- 3
EXAMPLE OF AN UPDATE ANOMALY
Slide 10- 4
EXAMPLE OF AN INSERT ANOMALY
Slide 10- 5
EXAMPLE OF AN DELETE ANOMALY
Slide 10- 6
Two relation schemas suffering from update
anomalies
Slide 10- 7
Example States for EMP_DEPT and
EMP_PROJ
Slide 10- 8
Guideline to Redundant Information in Tuples
and Update Anomalies
• GUIDELINE 2:
• Design a schema that does not suffer from the insertion, deletion and update
anomalies.
• If there are any anomalies present, then note them so that applications can be
made to take them into account.
Slide 10- 9
Null Values in Tuples
• GUIDELINE 3:
• Relations should be designed such that their tuples will have as few NULL
values as possible
• Attributes that are NULL frequently could be placed in separate relations
(with the primary key)
• Reasons for nulls:
• Attribute not applicable or invalid
• Attribute value unknown (may exist)
• Value known to exist, but unavailable
Slide 10- 10
Spurious Tuples
• GUIDELINE 4:
• The relations should be designed to satisfy the lossless join condition.
• No spurious tuples should be generated by doing a natural-join of any
relations.
Slide 10- 11
Spurious Tuples (2)
• Note that:
• Property (a) is extremely important and cannot be sacrificed.
• Property (b) is less stringent and may be sacrificed. (See Chapter 11).
Slide 10- 12
REFERENCE BOOKS
References
• Ø Fundamentals of Database Systems by R. Elmasri and S.B. Navathe, 3rd Edition, Pearson Education,
New Delhi.
• Ø An Introduction to Database Systems by C.J. Date, 7th Edition, Pearson Education, New Delhi.
Suggestive Reading
• https://www.geeksforgeeks.org/dbms/https://www.w3schools.in/dbms/
Video Links
• Ø YouTube Link- Video Lectures
• Ø https://www.youtube.com/watch?v=T7AxM7Vqvaw&list=PLdo5W4Nhv31b33kF46f9aFjoJPOkdlsRc
THANK YOU