Re: You are right...
Originally posted by elaine3839
Just curious -- how does Oracle save the FK?
Oracle implements PK and UK constraints by underlying indexes, so if there is no appropriate index allready created Oracle creates one automaticaly. But for FK constraints it doesn't realy need an underlying index, as the FK constraint is referencing a foriegn table. In fact, FK is actualy referencing a PK or UK constraint on the referencing table, and those PK or UK allready have an underlying index....
In short, Oracle implements FK by checking a remote PK or UK index to see if the current row has a maching value in a referencing table - so it realy doesn't need an index on a local table. But under certain circumstances there is a good habit to index FK constraints nevertheless manually.....
Jurij Modic
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
Bookmarks