For a while I have been a strong devote to using unique, autoincrementing ID fields for foreign key relationships.
I have come across some instances where using a UNIQUE code may work as well or even better. For example:
where state.code is the states abbreviation (NY = New York). If I am just hitting the city table I can get the state abbreviation with one table hit. If I did this with ID's I would always have to join both. Alternatively, if I need the state.name, I can link via the state.code
So my question is, what are the different philosophies of ID's. I came across a post that said _never_ link through an ID, since that would limit you ever having disjointed DB servers which periodically sync.
Thoughts, opinions -- thanks