tags:

views:

28

answers:

1

Creating a table of codes/abbreviations, each with a unique combination of case Sensitive letters. Is it ok to skip using an integer id and use them for foreign key checkups?
Or would there be issues I'm unaware of?

+1  A: 

It's not generally an issue when working with relatively static data such as a country or a language table, keyed on country_code or language_code. I'd certainly not bother with an integer id there.

But if it's a table that regularly has extra data inserted, it's normally easier to work with an integer id, especially an autoincrement value.

Mark Baker
Although, if there is a Natural key, you should use that: unless there is a very good reason not to.
Matthew Schinckel