But why worry, when that is so common situation when two or more people
do try to edit the same record at the same time? I do not worry about those
cases, I just check that the situation gets handled in some way.
Usually most DB engines, even with their default settings, do try and wait
maybe some 3..10 seconds, if the other user's record lock will be released
during that time. If it does not get released, error message will be shown.
Then it's up to the developer, how he decides to handle those cases.
It depends on the engine. The engine may automatically roll back this
un-succesfull update, and show an error message. Then it is up to the
developer if he puts a button on screen where user can try to re-send
the record or not.
DB engines do not know how to handle broken hard disk, or fragmented
FAT allocation system. But these cases can happen also on single user
Again it depends on the engine. But many C/S engines let you freely
choose if you want choose to use pessimistic or opportunistic locking.
You can choose to put Edit-lock (pessimistic locking) Post-lock (optimistic
locking) on records also on C/S databases.
Yes, but 'fixing things' and doing decisions, that's just our every
day work. Why worry so much? Too much worrying may give you gastric ulcer,
or some other *** , middle aged programmer illness:)