DBAsupport.com Forums - Powered by vBulletin
Results 1 to 10 of 15

Thread: Why can you have NULL in Foreign Key?

Threaded View

  1. #1
    Join Date
    Dec 1999
    Location
    Purgatory
    Posts
    346

    Why can you have NULL in Foreign Key?

    Okay, no flaming!! Remember it's the season of goodwill!

    Why does Oracle allow NULL to be inserted into a foreign key column?

    I've read the CONCEPTS manual again (so no RTFM please) - "Foreign Key is an integrity constraint that requires each value in a column or set of columns in a child table, to match a value in a related parent table's UNIQUE or PRIMARY KEY. The relational model permits the value of foreign keys either to match the referenced primary or unique key value, or be null. If any column of a composite foreign key is null, then the non-null portions of the key do not have to match any corresponding portion of a parent key."

    If it's supposed to be an integrity constraint, why does it allow you to create orphan child records??
    Last edited by Horace; 12-06-2004 at 11:06 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width