Here are SQL declarations for three tables R, S, and T:
CREATE TABLE R(e INT PRIMARY KEY, f INT); CREATE TABLE S(c INT PRIMARY KEY, d INT REFERENCES R(e) ON DELETE CASCADE); CREATE TABLE T(a INT PRIMARY KEY, b INT REFERENCES S(c) ON DELETE CASCADE);
Suppose R(e,f) contains tuples
(1,0), (2,4), (3,5), (4,3), and (5,7).
Suppose S(c,d) contains tuples
(1,5), (2,2), (3,3), (4,5), and (5,4).
Suppose T(a,b) contains tuples
(0,2), (1,2), (2,3), (3,4), and (4,4).
As a result of the referential integrity actions in the table declarations, certain deletions may cause additional deletions to be performed automatically. Which of the following deletions, after all integrity actions, leaves table T empty?
Question 1 options:
delete from R where e+f>6 |
|
delete from R where e*f>=10 |
|
delete from R where f<6 |
|
delete from R where e>=2 |
Hence the ans 4) e>=2 is the correct.
Get Answers For Free
Most questions answered within 1 hours.