Subject Re: [firebird-support] Dealing with inserts from multiple transactions
Author Doug Chamberlin
On 6/7/12 3:57 PM, Michael Ludwig wrote:
> Doug Chamberlin schrieb am 07.06.2012 um 14:07 (-0400):
>> I think I would challenge whether adding a necessary entity (to
>> satisfy the FK requirement) needs to be in the same transaction
>> as the overall dataset processing.
> Another possibility might be to screen the dataset (which apparently
> has to be processed in one fell swoop) to detect any missing entities
> and then to quickly create them, or rather, assert their existence,
> creating them as necessary.
Yes. On further thought I think I would make the whole ETL process a
two-pass affair. First pass check for existence of all needed entities
and creates ones that are missing. Second pass should do the inserting
proper without errors.