Hi all
I have a problem with database implementation.
As my DBAccess interface describes it should be done quite flexible.
I have following method:
// Modifies the fields of a record. The new value for field n
// appears in data[n]. Throws SecurityException
// if the record is locked with a cookie other than lockCookie.
public void updateRecord(long recNo,
String[] data, long lockCookie)
throws RecordNotFoundException, SecurityException;
which - I guess - should allow to update whole record not only the last field where booking value (custormer id) is stored.
Here I fall into a problem.
- client A reads record 1 (info about hotel room in Paris)
- client B updates record 1 (now room is in London)
- client A updates record 1 (room booking)
Of course from my GUI reqirements this example does not make any sense.
Nobody whants me to change room location.
I just wish to implement databse layer in a flexible way.
Does it require to keep versions of all records on a server and client
side and match them while updating?
Where can I put that version number when provided database interface
does not include this information?
Is there any chance for flexibility here?
Thanks
Tom