 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| l |
How to prevent
updates overwriting each other?
|
|
|
| l |
You can use
Optimistic Locking via 'qualified update':
|
|
|
|
update
table set ...=...
|
|
|
|
where key = $old_key
|
|
|
|
and
field1 = $old_field1
|
|
|
|
and
field2 = $old_field2 and … for all fields
|
|
|
|
n |
Potential
problems with floating point data values not matching
|
|
|
|
n |
Some databases
support a high-resolution 'update timestamp'
|
|
|
field that can be
checked instead
|
|
|
| l |
Check the update
row count
|
|
|
|
n |
If it's zero
then you know the record has been changed or deleted
|
|
|
by another
process
|
|