Modeling enumerated types in the database
Monday, May 29th, 2006Let’s say you have an Employees table and you want a column to track the status of an employee such as ['employed', 'resigned', 'retired', 'terminated', etc...]. You have a couple of options including:
- Using your database’s custom enumeration data-type if it has one
- Creating an int or char column and let the mapping live in the code
- Creating a lookup table

