0% found this document useful (0 votes)
90 views8 pages

Anomalies in Database

Anomalies in databases are unexpected behaviors resulting from poor design or data manipulation, including insertion, deletion, and update anomalies. Insertion anomalies prevent adding data without unrelated information, deletion anomalies lead to loss of related data when removing entries, and update anomalies cause inconsistencies when modifying data. These issues highlight the importance of proper database design to maintain data integrity.

Uploaded by

shazilgta6
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
90 views8 pages

Anomalies in Database

Anomalies in databases are unexpected behaviors resulting from poor design or data manipulation, including insertion, deletion, and update anomalies. Insertion anomalies prevent adding data without unrelated information, deletion anomalies lead to loss of related data when removing entries, and update anomalies cause inconsistencies when modifying data. These issues highlight the importance of proper database design to maintain data integrity.

Uploaded by

shazilgta6
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Anomalies in Database

LECTURER
MR. JAHANZAIB ALI KHAN
Contents
What is Anomaly?
Types of Anomalies
Disadvantages of Anomalies
Anomalies in Database
 Anomalies refer to unexpected or undesired behaviors that can
occur due to improper design or manipulation of data.
Types of Anomalies
Insertion Anomaly
 Insertion anomalies occur when it is not possible to add data to a database
without providing additional, unrelated information.

Deletion Anomaly
 Deletion anomalies occur when removing data from a database leads to l loss
of other related data that should have been preserved.

Update Anomaly
 Updation anomalies occur when modifying data in a database leads to
inconsistencies or conflicts within the data.
 It means that updating certain attributes can cause duplication, contradictory
values, or incorrect information within the database.
Insertion Anomaly
StudentNum CourseNum Student Name Address Course
S21 9201 Jones Edinburgh Accounts
S21 9267 Jones Edinburgh Accounts
S24 9267 Smith Glasgow physics
S30 9201 Richards Manchester Computing
S30 9322 Richards Manchester Maths

Consider a database table called "Students" with the following attributes:


Student_ID, Name, Age, and Course. Now, suppose a new student wants to enroll in a
course, but the course information is not yet available. In this case, you cannot insert
the student's details into the table.
Deletion Anomaly
For example, consider what happens if Student S30 is the last
student to leave the course - All information about the course is
lost.

StudentNum CourseNum Student Name Address Course


S21 9201 Jones Edinburgh Accounts
S21 9267 Jones Edinburgh Accounts
S24 9267 Smith Glasgow physics
S30 9201 Richards Manchester Computing
S30 9322 Richards Manchester Maths
Update Anomaly
For example, consider Jones moving address - you need to update
all instances of Jones's address.

StudentNum CourseNum Student Name Address Course


S21 9201 Jones Edinburgh Accounts
S21 9267 Jones Edinburgh Accounts
S24 9267 Smith Glasgow physics
S30 9201 Richards Manchester Computing
S30 9322 Richards Manchester Maths

You might also like