There is one apple left, I and you get the data, see its available and buy
one, you buy first, then I buy, if in my code I have not handled concurrency
then thats what we call concurrency violation, so both our transactions are
done, and there is only one apple,
Ideally my code should have checked that the record was not updated by any
one else before updating with my changes, one way to check the
lastupdatedtimestamp or the records value that I had received has not
changed.
Anubhav Mishra