Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Recursive relationship
Hi all,
I was looking at one of the development databases here at my shop and came across the following constraint on a table:
REM Generating create SQL for: CIRQIT.ITEM foreign constraint:
SYS_C009488
ALTER TABLE ITEM ADD CONSTRAINT SYS_C009488 FOREIGN KEY (
ITEM_NBR , VERSION_NBR ) REFERENCES CIRQIT.ITEM ( ITEM_NBR , VERSION_NBR ) ;
I was a little surprised that Oracle (8.1.6.0.0) even allowed for a self-referencing foreign key constraint to be created.
Can anyone out there give a "formal" explanation or references as to why such a recursive relationship is not good? I've used the terms "recursive relationship" and "keys referring back to themselves", etc. etc.
Thanks