I was reading the instructions of my assignment, and it does not restrict me from using java.nio. This makes life a whole lot easier ( I am glad I do not need to re-invent the wheel ).
1. I can use a file channel for every record. 2. The locking/unlocking feature is already built in with FileLock. 3. I don't see any need to cache, because I can directly map a ByteBuffer to a single record in the database file.
Can someone give me a reason not to go down this path.