Question: Consider the two tables shown in Figure 6.37. The TerID column in the SALES_REP relation is a foreign key referring to the primary key column
.png)
Figure 6.37 Relations SALES_REP and TERRITORY
a. If a DBMS enforces a DELETE RESTRICT option on the referential integrity constraint between SALES_REP and TERRITORY, show the records in tables SALES_REP and TERRITORY after a user tries to delete the fourth record (N, North) from TERRITORY.
b. If a DBMS enforces a DELETE RESTRICT option on the referential integrity constraint between SALES_REP and TERRITORY, show the records in tables SALES _REP and TERRITORY after a user tries to delete the second record (W, West) from TERRITORY.
c. If a DBMS enforces a DELETE RESTRICT option on the referential integrity constraint between SALES_REP and TERRITORY, show the records in tables SALES_REP and TERRITORY after a user tries to delete the first record (1, Joe, E) from SALES_REP.
d. If a DBMS enforces a DELETE CASCADE option on the referential integrity constraint between SALES_REP and TERRITORY, show the records in tables SALES_REP and TERRITORY after a user tries to delete the fourth record (N, North) from TERRITORY.
e. If a DBMS enforces a DELETE CASCADE option on the referential integrity constraint between SALES_REP and TERRITORY, show the records in tables SALES _REP and TERRITORY after a user tries to delete the second record (W, West) from TERRITORY.
f. If a DBMS enforces a DELETE CASCADE option on the referential integrity constraint between SALES_REP and TERRITORY, show the records in tables SALES_REP and TERRITORY after a user tries to delete the first record (1, Joe, E) from SALES_REP.
g. If a DBMS enforces a DELETE SET-TO-NULL option on the referential integrity constraint between SALES_REP and TERRITORY, show the records in tables SALES_REP and TERRITORY after a user tries to delete the fourth record (N, North) from TERRITORY.
h. If a DBMS enforces a DELETE SET-TO-NULL option on the referential integrity constraint between SALES_REP and TERRITORY, show the records in tables SALES_REP and TERRITORY after a user tries to delete the second record (W, West) from TERRITORY.
i. If a DBMS enforces a DELETE SET-TO-NULL option on the referential integrity constraint between SALES_REP and TERRITORY, show the records in tables SALES_REP and TERRITORY after a user tries to delete the first record (1, Joe, E) from SALES_REP.
j. If a DBMS enforces a DELETE SET-TO-DEFAULT option on the referential integrity constraint between SALES_REP and TERRITORY, show the records in tables SALES_REP and TERRITORY after a user tries to delete the fourth record (N, North) from TERRITORY. Assume that the default value for the DeptID column in the SALES_REP relation is €˜E€™.
k. If a DBMS enforces a DELETE SET-TO-DEFAULT option on the referential integrity constraint between SALES_REP and TERRITORY, show the records in tables SALES_REP and TERRITORY after a user tries to delete the second record (W, West) from TERRITORY. Assume that the default value for the DeptID column in the SALES_REP relation is €˜E€™.
l. If a DBMS enforces a DELETE SET-TO- DEFAULT option on the referential integrity constraint between SALES_REP and TERRITORY, show the records in tables SALES_REP and TERRITORY after a user tries to delete the first record (1, Joe, E) from SALES_REP. Assume that the default value for the DeptID column in the SALES_REP relation is €˜E€™.
TERRITORY SALES REP SRID TerName East West South North Central TerID TerID SRName Joe Sue Meg Bob Joe Pat Lee Joe
Step by Step Solution
3.42 Rating (184 Votes )
There are 3 Steps involved in it
a The record would not be deleted because there are records in the SALESREP table that have N as a foreign key SALESREP SRID SRName TerID 1 Joe E 2 Sue E 3 Meg C 4 Bob S 5 Joe N 6 Pat N 7 Lee N 8 Joe ... View full answer
Get step-by-step solutions from verified subject matter experts
Document Format (1 attachment)
623-CS-DB (1149).docx
120 KBs Word File
