Repeat 26.34 but use the syntax of STARBURST active rules.

What will be an ideal response?


(a) We assume that a procedure TELL_SUPERVISOR(ARGSSNS) has been created.
This procedure looks for employees whose SSN matches the social security numbers passed by the procedure’s AGRSSNS argument and it notifies supervisors of those employees.
CREATE RULE INFORM_SUPERVISOR_ABOUT_HOURS ON WORKS_ON
WHEN UPDATED (HOURS)
THEN TELL_SUPERVISOR (SELECT DISTINCT ESSN FROM
WORKS_ON AS W WHERE
((SELECT SUM(HOURS) FROM WORKS_ON AS R
WHERE W.ESSN = R.ESSN) < 30)
OR
(SELECT SUM(HOURS) FROM WORKS_ON AS R
WHERE W.ESSN = R.ESSN) > 40))
AND
W.ESSN IN (SELECT ESSN FROM NEWUPDATED);

(b)
CREATE RULE DELETE_IN_CASCADE ON EMPLOYEE
WHEN DELETED
THEN DELETE FROM WORKS_ON AS W
WHERE W.ESSN IN (SELECT ESSN FROM DELETED AS D
WHERE D.ESSN = W.ESSN);
DELETE FROM DEPENDENT AS P
WHERE P.ESSN IN (SELECT ESSN FROM DELETED AS D
WHERE D.ESSN = P.ESSN);
UPDATE EMPLOYEE AS E
SET E.SUPERSSN = ‘null’;
WHERE E.SSN IN (SELECT ESSN FROM DELETED AS D
WHERE D.ESSN = E.ESSN);

Computer Science & Information Technology

You might also like to view...

Match each item with a statement below.

A. A command used in CentOS 7 to provide a "snapshot" of the processes that are running B. A number used by CentOS 7 to uniquely identify a process C. The level of performance that you can expect during typical usage and workloads D. A system that acts like a file system but is specially constructed to interface with specific areas in a system E. A command that displays the amount or percentage of time a computer system or associated hardware is functioning and available for use F. A performance problem that occurs when multiple processes are competing for resources and all of them converge on the same resource at once G. A command used to stop or abort a process in a program or operating system H. A command that usually reports average values on process status, memory consumption, I/O operations, and CPU usage since the last reboot I. A command used in CentOS 7 to run a command repeatedly J. command-line reporting and control information system in CentOS 7 that directly interfaces with the kernel and is stored in memory

Computer Science & Information Technology

Which of the following is NOT a factor in writing backup data to an optical disc?

A) The amount of buffering in the drive B) The available hard drive space C) The amount of RAM in the computer D) The amount of memory on the video adapter

Computer Science & Information Technology

The Preview Transitions button is located in the Preview group on the Home tab.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

To create successful software, computer programmers go through a series of steps known as the:

A. EULA B. IDE C. SDLC D. ERP

Computer Science & Information Technology