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: Finn Ellebaek Nielsen <ellebuk_at_post3.tele.dk>
Date: 1997/05/24
Message-ID: <3386E05D.3EC1@post3.tele.dk>#1/1

Joshua Duhl wrote:
>
> 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.

Methods can be implemented in PL/SQL, C, C++, and Java (perhaps not before 8.1).

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

Yes, since there's no encapsulation/public/private scope.

> 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?

Yes. Let's hope they get support for inheritance, polymorphism, and encapsulation in 8.1 :-).

Cheers,

Finn

-- 
--------------------------------------------------------------------------------
 Finn Ellebaek Nielsen          Oracle Associated Senior Consultant
 Ellebaek Consulting            E-mail:           ellebuk_at_post3.tele.dk
 Niels Ebbesens Vej 9, 3. th.   Mobile Phone:     +45 20 32 49 25
 DK-1911  Frederiksberg C       Mobile Phone SMS: 20324925_at_sms.tdm.dk (Subject)
 Denmark                        Private Phone:    +45 33 25 34 50
--------------------------------------------------------------------------------
 "Life is a beach and then you dive"                      "Divers do it deeper"
Received on Sat May 24 1997 - 00:00:00 CDT

Original text of this message

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