0

I'm currently working on an application. One of the tables of this application represents people. In the table I've created an id column which auto increments and is the primary key. There is also another column which contains a unique identifier for each person that this table represents.

My dilemma and question is:

Should I use both of these uniquely identifying keys when doing updates or should I just use the id column for for doing updates to rows of the table?


That being asked, the application is a tiered application. The user interface is developed separately from the business layer part of the application. My reasoning was to use two keys just to ensure that the correct row was being updated every time. Maybe my reasoning is faulty.

1 Answer 1

0

If they are both unique then by definition either one will do. If one of them is less likely to change than another then use that one.

1
  • Thanks you for answering. They are both unlikely to change at all. Jan 15, 2014 at 10:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.