Hi David,
1. Is it OK not to reuse the deleted entry for new record? I think putting new records append to the end of db file is more simple.
I agree with Arun, just do it. As a non-english speaker, I understood "possibly" as "if possible". Then someone (Andrew and/or Jim ?) told me that it means "perhaps" or "maybe" ...and it's confirmed by my english-french dictionary.
But why would they mention reuse of deleted entries if they didn't expect you to do it ?!
Anyway, the requirement is not explicit, so it seems that you may choose not to implement that feature.
Yesterday, Vlad wrote in another
thread "(an) IT developer MUST strictly follow the specification and only do what is EXPLICITELY required.". It's a design choice
per se, probably one of the top main ones.
2. When to throw DuplicateKeyException in the createRecord method? It looks the method does not have chance to get duplicated key.
For the DuplicateKeyException, look at
this thread.
Best,
Phil.