In Oracle 10g, is it possible to define referential integrity constraints for a Foreign Key to refer to Primary Key in multiple parent tables.
Eg:
DEPT_AMER
DEPT_ID
10
11
12
DEPT_APAC
DEPT_ID
13
14
15
DEPT_EMEA
DEPT_ID
16
17
18
EMP
EMP_ID DEPT_ID
500 11
501 15
I want EMP.DEPT_ID to be able to refer to one of the department ids in DEPT_AMER, DEPT_APAC & DEPT_AMER. Is there a way to define a referential integrity to meet this need. The DEPT_ID in all the 3 tables is generated from a common sequence and are guaranteed to be unique.
If referential integrity constraint is not possible, is there a better way to maintain this data integrity ?