Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: A Primary Key and Foreign key
Excuse me I am not a DBA so please correct me if I am wrong, but I thought the
best way to load data into tables that have constraints already defined is to
DISABLE the constraint. Please DO NOT drop anything in a defined database if
you do not fully understand the structure!
You can use any CASE tool that allows you to reverse engineer Oracle to obtain a physical data model. Platinum's ERwin, Oracle's Designer, a product called Silverrun, et al, are all capable.
Also, I don't know if this is your situation but some vendor packages have been created as a one front end to many databases. This usually means that there aren't any FK constraints that physically reside on the database. A nightmare to untangle if the vendor can't or will not provide you with an accurate data model.
Please see the following excerpts from the Oracle Server Reference Guide:
when loading large amounts of data into a table using SQL*Loader when performing batch operations that make massive changes to a table (such as changing everyone's employee number by adding 1000 to the existing number) when importing or exporting one table at a time In cases such as these, integrity constraints may be temporarily turned off to improve the performance of the operation.
AND 2) The following statements are examples of statements that disable enabled integrity constraints:
ALTER TABLE dept
DISABLE CONSTRAINT dname_ukey;
ALTER TABLE dept
DISABLE PRIMARY KEY,
DISABLE UNIQUE (dname, loc);
Good Luck
Suzanne Received on Tue Nov 24 1998 - 23:57:41 CST
![]() |
![]() |