Originally posted by Yan Zhou:
1. Updating records:
We have required client program to correctly uses lock() and unlock() before and after calling update(), respectively. For example, the client must not call update() or unlock() without first successfully lock the record. This is guaranteed because we are writing the client code and there is no one else using the DBMain interface.
With this assumption, we do not worry about a client trying to unlock a record that is locked by another client, because all clients must use lock() and unlock() correctly.
2. Deleting records:
We have required that the client calls lock() before invoking delete(). However, since the record will have been deleted, there is no need to call unlock() after delete() returns.