Question: Please give an explanation for each Suppose that the relation SUPERVISE was created as follows: CREATE TABLE SUPERVISE ( pssnINT REFERENCESPROFESSOR(ssn)ON DELETE NO ACTION, gidINT
Please give an explanation for each
Suppose that the relation SUPERVISE was created as follows:
CREATE TABLE SUPERVISE ( pssnINT REFERENCESPROFESSOR(ssn)ON DELETE NO ACTION,
gidINT REFERENCESGRADUATE(gid)ON DELETE SET NULL,
pidINT REFERENCESPROJECT(pid)ON DELETE CASCADE, PRIMARY KEY(pssn, gid, pid) );
Which of the following statements are true, and which are false?
(a) If we delete a tuple from SUPERVISE, any tuples in PROJECT referred to by this tuple are also deleted.
(b) If we delete a tuple from GRADUATE, some tuples of SUPERVISE may have their values of attribute gid set to NULL.
(c) If we try to insert a tuple into PROFESSOR, with an ssn that does not exist in SUPERVISE, the operation is rejected.
(d) If we try to insert a tuple into SUPERVISE, with a gid that does not exist in GRADUATE, the operation is rejected.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
