sql - Varying RI Constraints between 3 tables. How does deletion in table A affect table C? -


please refer below image,

enter image description here

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

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -