Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle8's new features - what are they

Re: Oracle8's new features - what are they

From: Joshua Duhl <no.spam.jduhl_at_mediaone.net>
Date: 1997/05/23
Message-ID: <3385329E.63B5@mediaone.net>#1/1

Finn Ellebaek Nielsen wrote:
>
> Joshua Duhl wrote:
> >
> > Finn Ellebaek Nielsen wrote:
> > >
> > > Mike Yukish wrote:
> > > >
> > > > In article
> > > > <Pine.NEB.3.95.970521115910.1209B-100000_at_cripplecock.sarc.city.ac.uk>,
> > > > Akmal B Chaudhri <akmal_at_no_spam.uk> wrote:
> > > >
> > > > > On 19 May 1997, Walter Roberts wrote:
> > > > >

< Snipped >

> > >
> > > I agree that it's very sad that polymorphism and inheritance is not supported in
> > > 8.0, but please don't overlook the user-defined object types with properties
> > > (can be other object types as well) and methods.
> >
> > Whoa there... there ain't no "object types" they're just
> > abstract data types. Big difference. And I don't see
> > where you get the "methods" from. Where's the encapsulation?
> > Version 8 is no more OO than Version 7. It's focus is on
> > larger scale and some abstract data type support. But this
> > is a far, far cry from supporting objects. Supporting
> > inheritance is the biggest problem they have in supporting
> > objects.
>
> OK, encapsulation is missing as well. What do you mean no methods?
> Take a look at the following example:
>
> CREATE TYPE Address AS OBJECT
> (
> street VARCHAR2(40),
> city VARCHAR2(30),
> state CHAR(2),
> zip CHAR(10)
> );
>
> CREATE TYPE Person AS OBJECT
> ( first_name VARCHAR2(15),
> last_name VARCHAR2(30),
> addr Address,
> birthday DATE,
> MEMBER FUNCTION age() RETURN NUMBER
> );
>
> The Person object has the age() method (member funciton) attached.
>
> CREATE TABLE people OF Person;
>
> SELECT p.first_name, p.last_name, p.age(), p.addr
> FROM people p
> WHERE p.age() > 35;
>
> so the method age() is invoked on the Person object used in the people table.

Thanks for the example Finn.

(Looks like the Object SQL SELECT...FROM...WHERE invented at Ontologic and HP about 9 years ago... See, the relational databases are just catching up with object databases! :-)

OK it has a form of "methods". As a matter of terminology, I would distinguish the "message" from the "method". In this case the "message" is implemented as a "Member Function". The Member Function's "method" or implementation is in some language, C or SQL I presume.

I suppose I can also access "p.birthday" directly as well?

So Oracle 8 has member functions on abstract data types, but doesn't support encapsulation (and can't enforce it...) All member functions are essentially "public" (though there is no distinction in the definition to make it public or private) and all "data members" (attributes of the Type) are public as well.

Do I have it right, Finn?

Just getting even with spammers: postmaster_at_cyberpromo.com, postmaster_at_moonglow.com, postoffice_at_mooglow.com, postmaster_at_savetrees.com, postmaster_at_hotmail.com, americom_at_mcsi.net, cash_at_fortune-wheel.com,

postmaster_at_fortune-wheel.com, accesstwo_at_industryone.net, 
postmaster_at_industryone.net, carproinc_at_answerme.com, 
postmaster_at_answerme.com
Received on Fri May 23 1997 - 00:00:00 CDT

Original text of this message

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