Oracle Database 12c: Installation and Administration — Question 77

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 option that refers to the DEPARTMENTS.DEPARTMENT_ID column. An index exists on the DEPARTMENTS.DEPARTMENT_ID column. A

DELETE CASCADE -
transaction deletes a primary key in the DEPARTMENTS table, which has child rows in the EMPLOYEES table.
Which statement is true?

Answer options

Correct answer: C

Explanation

The correct answer is C because when a DELETE CASCADE is executed on the parent DEPARTMENTS table, it also locks the child EMPLOYEES table to prevent updates during the transaction. Options A and B incorrectly state that the lock only applies to the DEPARTMENTS table, while option D is incorrect because it suggests that only the deleted rows are locked, rather than the entire EMPLOYEES table.