Subject Re: [firebird-support] Re: triggers
Author Ann W. Harrison
Adam wrote:
> If a customer can have two different transactions running at the same
> time, the second transaction will be effectively locked out of
> updating the customer balance while the first one completes because
> there will be a lock on the customers balance record.
> If it is an issue, then create your customer balance table like this.

A danger in your solution is that a customer's balance could become
negative without any one transaction noticing it. If that's important,
then blocking updates on the balance until a transaction that modified
it is committed is the best answer.