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?
views:
28answers:
1
+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
2010-08-04 10:29:59
Although, if there is a Natural key, you should use that: unless there is a very good reason not to.
Matthew Schinckel
2010-08-04 12:21:26