1. find(int recNo) throws RecordNotFoundException - looks strange for me, since find() is not addressing a particular record, so it can not face with missing record problem. The only situation I can figure out is problems with underlying IO(raf or channel). But I'm not sure if RecordNotFoundException is the correct exception for such situation(since we are not working with concrete record). So question is open - when does find() use RecordNotfoundException?
2. create() method throws DuplicateKeyException, but assignment tells nothing about this exception or any validation that must be performed in create(). Since database format does not support 'key' field inidicator, it is unclear that 'duplicate key' means? Does it include all fields checking, or just particular(but which one?) checking for duplicates?
3. This one is on locking. lock()/unlock() documentation states, that these facilities ensures that only lock owner can update() or delete() record. But on ohter hand update() and delete() documentation say nothing about locking. So there can be two resolutions of this issue: lock() and update(), delete() are completely independent facilities(i.e. update() does not check for lock) and are used by higher(business) level dtabase wrapper; or all of them are related(i.e. update() fails if no lock is held). Seems like many posts refer to the latter case, but the first one is quite reasonable too(in this case database layer is quite simple and allows everything, but business layer takes care of everything). Any comments on this?
find(String criteria) - this one is not clear with record not found exc.
create(Strning data) - with this one is not clear that 'duplicate key' means.
as for locking, I understand and fully agree, that database layer should provide ability to lock record, since business layer will definitely need this functionality(lock + read + update + unlock sequence). The problem is that I'm not sure that locking should be automatically checked in database layer - maybe this should be left for business layer(i.e. database just provides locking functionality, while business class uses lock(), isLocked() etc. to ensure that only locked record will be modified).