Thank you, Ernesto and Jeffry
I understand the record index number could be the best choice of primary key in most situations. However, there is an exception : possibly reusing a deleted record when a user creates a new record.
The method create() is defined as following:
public int create(
String[] data) throws DuplicateKeyException;
How can you know when will you reuse a deleted record? I believe you have to compare something. Unfortunately, the parameter "data" does not have a room for record index number, it only contains the field such as "hotel name","hotel location", etc. Therefore, I have to find a primary key within the fields so that I can tell whether I should reuse a deleted record or not. And, if I can use a primary key which consists with the data of fields, the DuplicateKeyException makes more sense.
What do you think about this issue, my fellow ranchers ?
Thanks again for any replies
Eric