3 ms·
All these are good points. However, in the case where the Id is the nature key (e.g. SSN), the Id can be known from the user input. Creating an employee is ju
by ww520 15y ago
All these are good points.
However, in the case where the Id is the nature key (e.g. SSN), the Id can be known from the user input. Creating an employee is just a matter of PUT his full record along with his SSN as the Id.
- itcmcgrath 15y agoSave yourself some hassle. Don't key on SSN. 1) Encryption (and then indexing) becomes harder. 2) SSN's can change, for many reasons. (eg: http://consumerist.com/2008/11/can-i-change-my-social-security-number.html http://consumerist.com/2008/11/can-i-change-my-social-securi..., data entry error, etc)
- ericHosick 15y agoIt is a bad idea to use anything entered by a user as the primary key. It is ok to use data entered by users to assure the uniqueness of a record (unique indexes/constraints).