Subject | Re: [firebird-support] How would Firebird handle this. |
---|---|
Author | Ann Harrison |
Post date | 2012-12-27T15:39:42Z |
Iwan Cahyadi Sugeng <iwan.c.sugeng@...> wrote:
...the real problem lies on the
update
conflict when it tries to change the balance. If you can't see the most
recent
state of a record, you can't change it.
The real problem with keeping a single number, like an inventory, that gets
updated a lot by different concurrent users is that they will see lots of
update
conflict errors. The only way to update a record one which you've had an
update conflict is to rollback and restart your transaction.
Good luck,
Ann
[Non-text portions of this message have been removed]
...the real problem lies on the
> data integrity problem,some other transaction reduces it by six, your transaction will get an
>
> So opening balance is 10, all user only knows that the balance is 10, so
> all user transaction is valid, but because you are saving the stock in a
> field, then you would get unknown value for each user transaction and will
> cause inconsistency.
>
> Unless you use autocommit, that situation can't occur. If you read 10 and
update
conflict when it tries to change the balance. If you can't see the most
recent
state of a record, you can't change it.
The real problem with keeping a single number, like an inventory, that gets
updated a lot by different concurrent users is that they will see lots of
update
conflict errors. The only way to update a record one which you've had an
update conflict is to rollback and restart your transaction.
Good luck,
Ann
[Non-text portions of this message have been removed]