2.2
Consider the foreign-key constraint from the dept_name attribute of instructor to the department relation. Give examples of inserts and deletes to these relations that can cause a violation of the foreign-key constraint.
Insert a tuple
(10111, Ostrom, Economics, 110000)
into the instructor table, where the department table does not have the department Economics, would violate the foreign-key constraint. (Refer Figure 2.4 and Figure 2.5 for the instances of the relation instructor and department).Delete the tuple
(Biology, Watson, 90000)
from the department table, where at least one student or instructor tuple has dept_name as Biology, would violate the foreign-key constraint.