Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Seeking Equivalent of InterBase Domain
DA Morgan wrote:
> I doubt there is anything you can do in any other database that can't be
> done in Oracle. The question is really more one of whether doing so
> would be considered "best practice."
Would you use method and a structured type to implement a check
constraint? That's what a domain is. A typedef with built-in check
constraint.
Sounds like good practice to me.
Using a method and a structured type is overkill... (and aggreably
likely not good practice in a high performance environment)
Does Oracle have server side distinct-types (like PL/SQL subtype...)
combined with user defined casts? That would do the trick (placing the
constraint into the cast).
Cheers
Serge
PS: DB2 doesn't have user defined casts or domains either.
IDS has user defined casts
MS SQL Server (2000?) has domains
-- Serge Rielau DB2 Solutions Development IBM Toronto Lab WAIUG Conference http://www.iiug.org/waiug/present/Forum2006/Forum2006.htmlReceived on Sat Jan 20 2007 - 12:47:37 CST