The table shown in Figure 1 is susceptible to update anomalies. Provide examples
ID: 3702016 • Letter: T
Question
The table shown in Figure 1 is susceptible to update anomalies. Provide examples of insertion, deletion, and modification anomalies.
*please give a clear, typed answer, no handwrite*
Explanation / Answer
Answer)
Insertion anomaly occurs when we try to insert a record in the table when referencing relation and referencing attribute value is not present in referenced attribute, this will not allow the insertion to the table. In the above table if we insert the record:
The above record will not get inserted and will give a insertion anomaly as the doctor with staffNo S1040 and patientNo P134 is not present in the referenced tables and this insertion anomaly would occur.
Deletion and Updation anomalies:
Deletion anomalies and Updation anomalies: will occur in the table if the record is deleted or updated from referenced relation and referenced attribute value is used by referencing attribute in referencing relation, then it will not allow the deletion or updation of the records.
Thus deleting a particular record here or updating a record to some value that doesn't exist in the table reference from to, will give anomalies.
Also, in the above table, we can see that the primary key column is not specified. So there will be updation and deletion anomalies. For example of we try to update or delete a record with staffNo S1024 and patientNo P108, then we will update 2 records even if we do not intend to. For these 2 records, are 2 separate records and there is no primary key such as a appointmentNo which can identify each records uniquely.
S1040 John Smith P134 Derham Bridge 12-Sep-03 , 10.00 $10Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.