Guys,
I was wondering if somebody can throw me a few thoughts on the issues of data integrity on the database side of the
SCJD project.
Heres the scenario, 2 clients running in network mode, they both get a snapshot of flights and match the same flight, not uncommon.
Client 1 books 2 seats and the avaliable seats in the database is reduced by 2.
Then client 2 books 5 seats on the same flight, but has an old avaliable seats count, and that count (within the DataInfo record) is overwritten in the database with the original seats avaliable value minus client 2's requested seat booking. The result is client 1's booking has been overwritten.
How are you all combatting this:
- I can think of one way and that is to check the available seats ON THE SERVER before you perform the booking but that will be inconsistent with the current user data, and confusing to the user, unless you inform them specifically ?
Any thoughts ?
Mick