I have the basic setup depicted in this SQL Fiddle. In short, I have a table which has a candidate foreign key whose value may ID a record in one of several tables (if it's not NULL, that is)! How am I supposed to tell Oracle (11g r2) about this, or is putting a foreign key constraint on such a column a hopeless cause?
(Note: this is not due to any sort of partitioning -- the equivalents to foo
, bar
, and baz
in the real DB have completely different schemas save for them all having IDs that can be guaranteed to not overlap.)