Re: Best practice for loading data into relational tables
Date: Tue, 18 Mar 2008 13:14:56 -0700
Message-ID: <1205871295.11776@bubbleator.drizzle.com>
Gints Plivna wrote:
> I agree with others that SQLLoader is the way to go. However that
> won't help you much with fk errors, unless of course you disable them
> in advance. So here you can use intermediatte tables without any FK
> logic just load data in them. After succesful loading use insert
> into ... select from... And here you can quite easily insert firstly
> the very parent rows then children, then grandchildren. Of course
> there might be some circular FKses but this is quite unusual case,
> then you'd have to either disable a few FKses or make them deferred
> and commit only at the very end of insert process when everything is
> OK.
>
> Gints Plivna
> http://www.gplivna.eu
Or use deferrable constraints which would likely be better than disabling default immediate constraints.
-- Daniel A. Morgan Oracle Ace Director & Instructor University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Tue Mar 18 2008 - 15:14:56 CDT