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.

Computer Science & Information Technology

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

Computer Science & Information Technology

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)

Computer Science & Information Technology

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

Computer Science & Information Technology

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).

Computer Science & Information Technology