Assume you have an enumeration like PhoneType { Home, Business, Cell }.
This enumeration corresponds with a lookup/dictionary table in your database
like:
phone_cd | phone_descr
1 Home
2 Business
3 Cell
Now, I could associated each enumeration value with the phone_cd used in the
database. However, that strikes me as problematic ... it's like having two
copies of the same information in different places. However, otherwise I
need to be able translate between my enumeration values, and the database
values.
Is there a best practice(s) for dealing with this situation? Obviously it
depends on the circumstances, but general comments would be appreciated.
Thanks in advance.
Mark