From jonathan@jlcomp.demon.co.uk Mon, 27 Aug 2001 10:18:47 -0700 From: "Jonathan Lewis" Date: Mon, 27 Aug 2001 10:18:47 -0700 Subject: Re: PK/Fk question Message-ID: MIME-Version: 1.0 Content-Type: text/plain There is also the drawback that the trigger has to do a 'select for update', with all associated contention problems, otherwise the effect of read-consistency would allow a trigger to determine that a parent existed when in fact it had been deleted by an uncommitted transaction. Jonathan Lewis Host to The Co-Operative Oracle Users' FAQ http://www.jlcomp.demon.co.uk/faq/ind_faq.html Author of: Practical Oracle 8i: Building Efficient Databases See http://www.jlcomp.demon.co.uk/book_rev.html For latest news of public appearances See http://www.jlcomp.demon.co.uk Screen saver or Life saver: http://www.ud.com Use spare CPU to assist in cancer research. -----Original Message----- To: Multiple recipients of list ORACLE-L Date: 27 August 2001 18:15 You can only FK to field(s) that are unique or primary key constraints. if col1 is unique, you can put a unique constraint on it and then FK to it from the child. your only other choice is to do FK checkign via triggers(i did it for distributed databases, where parents were on one db and children were on 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@jlcomp.demon.co.uk Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).