Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Seeking Equivalent of InterBase Domain

Re: Seeking Equivalent of InterBase Domain

From: EdStevens <quetico_man_at_yahoo.com>
Date: 19 Jan 2007 14:54:13 -0800
Message-ID: <1169247253.465944.256640@38g2000cwa.googlegroups.com>

MRCarver wrote:
> In past InterBase databases that I have worked with, since there is no
> Boolean data type, I have used a Domain called BOOLEAN_DOMAIN, defined
> in DDL as follows:
>
> create domain BOOLEAN_DOMAIN as CHAR(1) default 'N' NOT NULL check
> ((VALUE = 'N') or (VALUE = 'Y'));
>
> then in my create table statements it becomes very simple:
>
> create table MY_TABLE (
> TABLE_KEY KEY_DOMAIN NOT NULL,
> HAS_BOOL BOOLEAN_DOMAIN,
> etc.
>
> So far the only thing I have seen to do in Oracle is to create the
> boolean column as Char(1) and then put a check constraint below my
> primary key constraint definition.
>
> I have explored using a "Type", but it seems that this construct goes
> way beyond what a domain is designed for in InterBase. There is also
> some reference in the literature to sub-types. Are sub-types related?
>
> Any suggestions?
>
> Monte

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. Received on Fri Jan 19 2007 - 16:54:13 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US