Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Foreign Keys

Re: Foreign Keys

From: Jonathan Gennick <gennick_at_worldnet.att.net>
Date: Wed, 17 Jun 1998 00:37:25 GMT
Message-ID: <6m733r$qt@bgtnsc03.worldnet.att.net>


On 15 Jun 1998 21:45:56 GMT, "michael t hudacko" <hudacko_at_bbdo.com> wrote:

>We need to delete some tables in which FK constraints have been set-up from
>child tables...
>what is the proper method to accomplish this?
>Do you drop FKs? And recreate them after test dat is deleted and real data
>is loaded?
>do you delete the table data in which the FKs were declared?

I'm not sure there is a "proper" way. It depends on your ultimate goal. If you are going to reload data that will make all the constraints good again, then you can just disable the constraints for awhile. I do this whenever I have to recreate a table in order to rename or drop a column. If you want to delete the data for good, then you need to delete the matching datafrom the child tables first.

If the data you are deleting is test data, isn't the data in the child tables also test data? In that case, why not delete the child tables first, and then delete from the parent? Received on Tue Jun 16 1998 - 19:37:25 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US