foreign key, or "in" constraint?
Date: Mon, 06 Oct 2008 20:39:17 GMT
Suppose you have a table with a status column, and the status can be one of "queued", "inprogress", "failed", or "completed".
This can be enforced two ways:
- status has a FK to a "statuses" table, and the allowed statuses are in that table.
- with a constraint such as status in ('queued','ip','failed','completed')
Which is more typically used? What are the pros and cons, tradeoffs, etc, of each?
-- Mark Harrison Pixar Animation StudiosReceived on Mon Oct 06 2008 - 15:39:17 CDT