Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to insert values?
Me wrote:
> On Sun, 18 May 2003 13:23:38 -0700, Ana C. Dent wrote:
> :The "obvious"(?) solution is to.....
> :
> :DISABLE the primary & foreign keys.
> :Load the data into the tables.
> :ENABLE the primary & foreign keys.
>
> Yes, that is an obvious solution. I infact used an 'obvious solution'
> even when I had problems creating the tables because each one had a
> foreign key!
>
> But is there a 'more correct' or 'elegant' solution to
>
> 1) Creating the tables
> 2) Inserting the values (with foreign and primary keys enabled)
>
> Thanks.
YES!
Don't design a "closed loop" collection of tables.
If the design is a heirachical collection, then
load the top table & recursively load working towards
the bottom of the collection; one level at a time.
No amount of hand waving makes a poor design "elegant". Received on Sun May 18 2003 - 17:04:21 CDT