Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Seeking Equivalent of InterBase Domain
EdStevens schreef:
> MRCarver wrote:
> > Well, first off .. InterBase <> Oracle. Don't try to reverse engineer > to work like something else. > > Second, maybe I'm missing something, but it looks like you are wanting > a boolean data type for a primary key column???? That would mean you > could only ever have two rows in the table. I must be missing > something. >
In case of a boolean domain, that is the entry should be either
value1 or value2, I'd opt for a check constraint on the base
table, not for a foreign key and lookup table.
Anything over, say, 5 values, I'd probably go for a lookup
table, especially when "domain values are almost always constant".
Meaning they change.
In case of deletion/alterations, tables are harder to maintain,
if not carefully designed (use of a valid_until date!) than
check constraints.
In case of additions only, the table construct is by far the easiest!
As usual - it depends :). On your business needs. I miss the original thread, so this is more of a relply to Monte than to Ed, and I hope this clarifies some.
-- Regards, Frank van Bortel Top-posting is one way to shut me up...Received on Sat Jan 20 2007 - 04:26:16 CST