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: Mark D Powell <Mark.Powell_at_eds.com>
Date: 19 Jan 2007 16:05:38 -0800
Message-ID: <1169251538.585930.292170@v45g2000cwv.googlegroups.com>

MRCarver wrote:
> > Well, first off .. InterBase <> Oracle. Don't try to reverse engineer
> > to work like something else.
>
> Not trying to reverse engineer, but simply trying to grasp Oracle's
> equivalent to Interbase's "DOMAIN". A "DOMAIN", such as in Interbase or
> in CASE tools like Embarcedero's ERStudio, describe commonly used data
> types with certain constraints. This way you define the constraint
> once, then simply bind it to a given field.
> >
> > 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.
> >
>
> Not primary key, just a field having boolean choices. Other examples of
> likely domains are
> "POSTAL_CODE_DOMAIN"
> "GENDER_DOMAIN"
> "ADDRESS_DOMAIN"
I haven't seen the term domain used to describe the range of values an attribute can hold in a long time. I can see some advantages in such a feature. However, Oracle really does not offer a direct equilivent nor do I think you want to use user types in your tables to provide this functionality.

I am of the opinion that objects, like java, belongs in the middle layer. That is, in the application and not the database. Oracle objects are useful in pl/sql code but generally provide little benefit when stored in permanent tables.

Just define the check constraint on each table that has a gender column that is subject to update.

In reference to the key_domain Oracle provides the CREATE SEQUENCE command to create numeric key generators that can be used in insert statements or before insert table row triggers to populate generated key columns.

HTH -- Mark D Powell -- Received on Fri Jan 19 2007 - 18:05:38 CST

Original text of this message

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