sql - Varying RI Constraints between 3 tables. How does deletion in table A affect table C? -
please refer below image,
manager attribute refers id attribute in employee table , project refers code attribute in project table.
suppose manager has on delete cascade , project attribute has on delete restrict. happen if deleted employee manager project in potential customers table?
oracle go down chain of references , stop on on "ora-02292: integrity constraint (.) violated - child record found" if finds "restricted" foreign key constraint.
if fk constraints in chain defined "cascade", rows in project associated manager ids matching deleted rows in employee deleted , similarly, rows in potential_customers having project ids deleted in project deleted.
Comments
Post a Comment