Consider the EMPLOYEE table’s constraint EMPSUPERFK as specified in Figure 4.2 is changed to read as follows:
CONSTRAINT EMPSUPERFK
FOREIGN KEY (SUPERSSN) REFERNCES EMPLOYEE(SSN)
ON DELETE CASCADE ON UPDATE CASCADE,
Answer the following questions:
a. What happens when the following command is run on the database state shown in Figure 5.6?
DELETE EMPLOYEE WHERE LNAME = ‘Borg’
b. Is it better to CASCADE or SET NULL in case of EMPSUPERFK constraint ON DELETE?
a) The James E. Borg entry is deleted from the table, and each employee with him as a supervisor is also (and their supervisees, and so on). In total, 8 rows are deleted and the table is empty.
b) It is better to SET NULL, since an employee is not fired (DELETED) when their supervisor is deleted. Instead, their SUPERSSN should be SET NULL so that they can later get a new supervisor.
You might also like to view...
__________ external devices are suitable for communicating with electronic equipment.
A) ?Communication ? B) ?Application C) ?Machine readable ? D) ?Human readable
The use of a fill color in a cell or range of cells sets off the cell or range from other portions of the worksheet and provides visual impact to draw the user's eye toward the cell or range.
Answer the following statement true (T) or false (F)
When using the Data Filters command, which of the following is NOT a date reference?
A) Two Days Ago B) This Week C) This Month D) Last Year
To create a linking formula between a chart title object and a worksheet cell, first insert a(n) ____________________ in the chart.
Fill in the blank(s) with the appropriate word(s).