Page 1 of 1

Integrity Constant

Posted: Wed Sep 13, 2006 3:58 pm
by vardhan354
Folks,


I have two tables A and B. These two tables are created in such a way that Table A has a parent key relationship on few attributes in Table B and Table B has a Parent Key relationship on few attributes in Table A.

I need to do destructive loading on these two tables every night.I now I can drop the integrity constraints before and re-build them again after.But is there any best way of doing the etl job for these two tables with out dropping constraints(optional).Please throw your suggestions.Any help would be greatly appreciated.


Thanks

Re: Integrity Constant

Posted: Wed Sep 13, 2006 5:05 pm
by deepak.shanthamurthy
vardhan354 wrote:Folks,


I have two tables A and B. These two tables are created in such a way that Table A has a parent key relationship on few attributes in Table B and Table B has a Parent Key relationship on few attributes in Table A.

I need to do destructive loading on these two tables every night.I now I can drop the integrity constraints before and re-build them again after.But is there any best way of doing the etl job for these two tables with out dropping constraints(optional).Please throw your suggestions.Any help would be greatly appreciated.


Thanks
Not Clear...how would you be able to drop your integrity constraints, load the data and then rebuild them.. ? if i understood correctly..
the best way to maintain integrity would be to perform lookups and then load the target based on the lookup results..

Posted: Wed Sep 13, 2006 5:38 pm
by ray.wurlod
Sure, just go ahead and load.

But it will be faster without the constraints. If you can promise the DBA that your data will not violate any constraints, then it ought to be OK to drop them and later re-impose them. After all, an empty table is not needful of constraints.

Posted: Wed Sep 13, 2006 7:12 pm
by kumar_s
ALTER TABLE and DROP CONSTRAINT in the before sql and ADD CONSTRIANT in After sql.