Forums Register Login

question on create() methond

+Pie Number of slices to send: Send
in my interface i have:
public int create(String [] data) throws DuplicateKeyException;

if i decided to use record number as my primary, I will always let user enter insert a row to db even though its same data(same name, location etc...) is it acceptable?
+Pie Number of slices to send: Send
It is very acceptable to me.. There could be 2 "Bob Smith" in "Montreal"..

My decision was to not interfere with this. I thought, from reading the assignment, that there were no requirement asking for any restriction on this, so following that logic, I thought it would actually be wrong to do so.

But I've read others used some fields as the key as well. It's really of matter of making your own choice.

Regards,
Alex
The fastest and most reliable components of any system are those that are not there. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 585 times.
Similar Threads
locking
Inconsistant Data Updation problem in WEB application(Multiuser Application)
webservice
NX:should lock the database during the creating?
Inserting BLOB data
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 07:27:15.