Re: Best practice for loading data into relational tables

From: Gints Plivna <gints.plivna_at_gmail.com>
Date: Tue, 18 Mar 2008 00:58:11 -0700 (PDT)
Message-ID: <349b4550-a037-4494-9260-6954dce43b75@u72g2000hsf.googlegroups.com>


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 Received on Tue Mar 18 2008 - 02:58:11 CDT

Original text of this message