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 -> Seeking Equivalent of InterBase Domain

Seeking Equivalent of InterBase Domain

From: MRCarver <mrcnewGroup_at_charter.net>
Date: Fri, 19 Jan 2007 11:41:24 -0800
Message-ID: <qb9sh.36$Zs.28@newsfe06.lga>


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 Received on Fri Jan 19 2007 - 13:41:24 CST

Original text of this message

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