Skip to Main Content

SQL Developer Data Modeler

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Source optional and Target optional attributes question

780462Nov 26 2011 — edited Dec 21 2011
Is my below understanding correct on Relation properties for Logical model with respective to physical model / DDL generated? Here database is assumed to be oracle.


If Source is optional or not optional and Target is optional then
a) The referenced column (FK attribute) in the child table is nullable.
b) On delete of a row in parent entity, the child FK attribute will be set null. Delete rule will be "Set Null" for FK constraint.



If source is optional and target is not optional then,,
a) The referenced column (FK attribute) in the child table is not null
b) Delete rule will be "Restrict" / No action. This rule deletes parent row only if child entity is already deleted otherwise error will be thrown.


If source is not optional and target is not optional then
a) The referenced column (FK attribute) in the child table is not null
b) Delete rule will be "Cascade". This rule deletes child row automatically, when delete operation is attempted for parent.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 18 2012
Added on Nov 26 2011
9 comments
2,329 views