Integrity Constant

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
vardhan354
Participant
Posts: 76
Joined: Wed Jan 25, 2006 6:42 pm

Integrity Constant

Post 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
ETL
deepak.shanthamurthy
Participant
Posts: 17
Joined: Tue Apr 11, 2006 2:35 pm

Re: Integrity Constant

Post 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..
Deepak
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

ALTER TABLE and DROP CONSTRAINT in the before sql and ADD CONSTRIANT in After sql.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply