Which statement is true?

The HR.DEPARTMENTS table is the parent of the HR.EMPLOYEES table. The EMPLOYEES.DEPARTMENT_ID
column has a foreign key constraint with the ON DELETE CASCADE option that refers to the
DEPARTMENTS.DEPARTMENT_ID column. An index exists on the DEPARTMENTS.DEPARTMENT_ID column.
A transaction deletes a primary key in the DEPARTMENTS table, which has child rows in the EMPLOYEES table.
Which statement is true?

The HR.DEPARTMENTS table is the parent of the HR.EMPLOYEES table. The EMPLOYEES.DEPARTMENT_ID
column has a foreign key constraint with the ON DELETE CASCADE option that refers to the
DEPARTMENTS.DEPARTMENT_ID column. An index exists on the DEPARTMENTS.DEPARTMENT_ID column.
A transaction deletes a primary key in the DEPARTMENTS table, which has child rows in the EMPLOYEES table.
Which statement is true?

A.
The transaction acquires a table lock only on the DEPARTMENTS table until the transaction is complete.

B.
The transaction acquires a table lock on the DEPARTMENTS table. This lock enables other sessions to
query but not update the DEPARTMENTS table until the transaction on the DEPARTMENTS table is complete.

C.
The transaction acquires a table lock on the EMPLOYEES table. This lock enables other sessions to query
but not update the EMPLOYEES table until the transaction on the DEPARTMENTS table is complete.

D.
Only the rows that are deleted in the DEPARTMENTS and EMPLOYEES tables are locked until the
transactions on the DEPARTMENTS table is complete.



Leave a Reply 2

Your email address will not be published. Required fields are marked *