QuestionQ88

VerifiedManaging Data Concurrency

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 references the DEPARTMENTS.DEPARTMENT_ID column. An index exists on the DEPARTMENTS.DEPARTMENT_ID column.

A DELETE CASCADE transaction deletes a primary key from the DEPARTMENTS table that has child rows in the EMPLOYEES table.

Which statement is true?

Explanation

An index on the parent key does not index the child foreign-key column. When a parent primary key is deleted while the child foreign key is unindexed, Oracle acquires a full table lock on the child table; other sessions can query that table but cannot update it during the parent-key modification. ON DELETE CASCADE deletes the dependent child rows as part of the operation.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!