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?
Creating a table of codes/abbreviations, each with a unique combination of case Sensitive letters.
Share
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.