Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: PK/Fk question
oh i definitely didnt include all of the problems associated with
distributed enforcement of FK. I was denoting the obvious :)
joe
>>> jonathan_at_jlcomp.demon.co.uk 08/27/01 02:22PM
>>>There is also the drawback that thetrigger has to do a
'select for update',with all associated contention problems,otherwise
the effect of read-consistencywould allow a trigger to determine that
aparent existed when in fact it had beendeleted by an uncommitted
transaction.Jonathan LewisHost to The Co-Operative Oracle Users'
FAQ<A
href="http://www.jlcomp.demon.co.uk/faq/ind_faq.html">http://www.jlcomp.demon.co.uk/faq/ind_faq.htmlAuthor
of:Practical Oracle 8i: Building Efficient DatabasesSee <A
href="http://www.jlcomp.demon.co.uk/book_rev.html">http://www.jlcomp.demon.co.uk/book_rev.htmlFor
latest news of public appearancesSee <A
href="http://www.jlcomp.demon.co.uk">http://www.jlcomp.demon.co.ukScreen
saver or Life saver: http://www.ud.comUse
spare CPU to assist in cancer research.-----Original
Message-----To: Multiple recipients of list ORACLE-L
<ORACLE-L_at_fatcity.com>Date: 27 August 2001 18:15You can
only FK to field(s) that are unique or primary keyconstraints.if
col1 is unique, you can put a unique constraint on it and then FKto it from
the child.your only other choice is to do FK checkign via triggers(i did
it fordistributed databases, where parents were on one db and children
wereon other, efficient NO but it was a
requirement).joe-- Please see the official ORACLE-L
FAQ: http://www.orafaq.com-- Author:
Jonathan Lewis INET: jonathan_at_jlcomp.demon.co.ukFat City
Network Services -- (858) 538-5051 FAX: (858)
538-5051San Diego, California --
Public Internet access / Mailing
Lists--------------------------------------------------------------------ToREMOVE yourself from this mailing list, send an E-Mail messageto: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and inthe message BODY, include a line containing: UNSUB ORACLE-L(or the name of mailing list you want to be removed from). You mayalso send the HELP command for other information (like subscribing). Received on Mon Aug 27 2001 - 12:49:11 CDT
![]() |
![]() |