retagged by
465 views
1 votes
1 votes

Consider the following table structures:

CREATE TABLE dept(dno number PRIMARY KEY, dname varchar2(30));

CREATE TABLE emp(eno number PRIMARY KEY, ename varchar2(30), dno number references dept(dno)
ON DELETE CASCADE ON UPDATE CASCADE);

Which of the following statements is FALSE for the above table structures?

  1. Insert into DEPT is always successful.
  2. Update on DEPT is always successful.
  3. Delete on DEPT is always successful.
  4. Update on EMP is always successful.
retagged by

1 Answer

Best answer
1 votes
1 votes
Here, DEPT table has primary key dno.

EMP has foreign key dno and also there are integrity constraints ON DELETE AND ON UPDATE CASCADE.

So, Deletion, updation, insertion will be always successful bcoz there are actions defined in other table.

But updation in EMP should refer the DEPT table. So, NOT ALWAYS SUCCESSFUL (i.e, if the tuple is not in EMP)..

So, Option (D).............
selected by
Answer:

Related questions