Re: user defined data type: does they exist ?

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: Fri, 18 Jan 2008 10:55:59 -0800 (PST)
Message-ID: <286d7bdd-a8e7-4d8e-8564-9326bb0f26fd@e4g2000hsg.googlegroups.com>


On Jan 18, 5:39 am, alberto.rol..._at_gmail.com wrote:
> > SQL Manual entry CREATE TYPE
> > PL/SQL User's Guide and Reference  -- contains many examples of using
> > object types
>
> hello, thanks. I've already tried it, but it seems to me that it can
> "only" create complex types, something like struct in C++.
>
> And to use them, I have to use a "constructor" in the insert
> statement.
>
> I need to be able to do only something like
>
> insert into table AA (column1) values ('this is a string with maximum
> 50 chars')
>
> and not something like
>
> insert into table AA (column1) values (CODE('this is a string with
> maximum 50 chars'))
>
> Maybe I missed something on the create type syntax ?
>
> thank you very much!

If you object type consists of a single varchar2 value why do you need an object at all?

My professional opinion based on experience and common sense is that objects do not belong stored in a relational database but should be created and manipulated in the application layer.

Adhoc query tools and end users do not relate to stored objects.

You can however sometimes use objects to advantage in PL/SQL code that manipulates data.

HTH -- Mark D Powell -- Received on Fri Jan 18 2008 - 12:55:59 CST

Original text of this message