How do you solve this if you use only record number?
public int create(
String [] data) throws
DuplicateKeyException;
it doesn't matter if you use a deleted record or append one.
if you append you'll never get DuplicateKeyExeption , and if you reuse you do so only if record is deleted so no chance of getting Duplicate there either.
so DuplicateKeyException is never to be thrown and the question is does that compile with a specification.