Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Seeking Equivalent of InterBase Domain
William Robertson wrote:
> Jim Smith wrote:
>> In message <1169531413.53689_at_bubbleator.drizzle.com>, DA Morgan >> <damorgan_at_psoug.org> writes >>> hasta_l3_at_hotmail.com wrote: >>> >>>> you have to repeat the type constraints for every column >>>> defined with that type. It's a development nigthmare... >>>> Monte, FWIW we are using SQL*Plus DEFINE ... >>>> --- Raoul >>> Possibly but not necessarily. Types have type bodies that >>> contain methods. What is it that you would want to do, or >>> the OP wants to do, that could not be defined in a type >>> body. >>> >>> I'm not going to say that a method is or is not going to >>> do the job. But I'd sure like to see a substantive example >>> of what is being asked to see if it is or is not the case >>> before just agreeing that a domain can do something that >>> can not be done in Oracle. >> To use your own exanp >> SQL> CREATE OR REPLACE TYPE first_name AS OBJECT ( >> 2 first_name VARCHAR2(25)); >> 3 / >> >> Type created. >> >> SQL> create table names ( >> 2 fname first_name); >> >> Table created. >> >> SQL> insert into names(fname) values ('adsfads'); >> insert into names(fname) values ('adsfads') >> * >> ERROR at line 1: >> ORA-00932: inconsistent datatypes: expected JIM.FIRST_NAME got CHAR >> >> The domain as described by the OP defines types which can be used like >> native types.
Daniel, I have no problem accepting that DB2 can't do it (and we have the same OO features Oracle has). Given that you claim to be non biased what is so hard about accepting the fact that there exist features in other DBMSs your favorite doesn't have that are still useful? I'm sure if Oracle felt the need, they (just like us) could implement it. It ain't exactly innovative... just work.
Cheers
Serge
-- Serge Rielau DB2 Solutions Development IBM Toronto LabReceived on Tue Jan 23 2007 - 07:28:04 CST
![]() |
![]() |