Path: text.usenetserver.com!out02b.usenetserver.com!news.usenetserver.com!in04.usenetserver.com!news.usenetserver.com!nlpi057.nbdc.sbc.com!prodigy.net!flpi088.ffdc.sbc.com!prodigy.com!flpi107.ffdc.sbc.com!flpi144.ffdc.sbc.com.POSTED!22f23b6c!not-for-mail
Sender: Mark Harrison <mh@ohm.dynamic.pixar.com>
From: mh@pixar.com
Subject: foreign key, or "in" constraint?
Newsgroups: comp.databases.oracle.misc
User-Agent: tin/1.9.1-20060409 ("Benmore") (UNIX) (Linux/2.6.18-1.2200p7 (x86_64))
Lines: 21
Message-ID: <VHuGk.2205$Rx.296@flpi144.ffdc.sbc.com>
NNTP-Posting-Host: 138.72.131.96
X-Complaints-To: abuse@prodigy.net
X-Trace: flpi144.ffdc.sbc.com 1223325557 ST000 138.72.131.96 (Mon, 06 Oct 2008 16:39:17 EDT)
NNTP-Posting-Date: Mon, 06 Oct 2008 16:39:17 EDT
Organization: at&t http://my.att.net/
X-UserInfo1: T[OIR^OG]JVWCFD[LZKJOPHAWB\^PBQLGPQRJRQIMASJETAANVW[AKWZE\]^XQWIGNE_[EBL@^_\^JOCQ^RSNVLGTFTKHTXHHP[NB\_C@\SD@EP_[KCXX__AGDDEKGFNB\ZOKLRNCY_CGG[RHT_UN@C_BSY\G__IJIX_PLSA[CCFAULEY\FL\VLGANTQQ]FN
Date: Mon, 06 Oct 2008 20:39:17 GMT
Xref: usenetserver.com comp.databases.oracle.misc:253962
X-Received-Date: Mon, 06 Oct 2008 16:40:03 EDT (text.usenetserver.com)

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:

1.  status has a FK to a "statuses" table, and the allowed statuses
    are in that table.

2.  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?

Many TIA!
Mark

-- 
Mark Harrison
Pixar Animation Studios
