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: Cpraber <cpraber_at_aol.com>
Date: 1997/05/23
Message-ID: <19970523173401.NAA06251@ladder01.news.aol.com>#1/1

In article <3384753C.68F6_at_post3.tele.dk>, Finn Ellebaek Nielsen <ellebuk_at_post3.tele.dk> writes:

>
>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.
>
>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"
>
>

Can we define age() member functions for other ADT's? I don't think so. No polymorphism!

-Chris.



Chris Raber, Systems Engineer, GemStone Systems Inc. 100 West Big Beaver, Suite 200
Troy, MI 48084
phone: (248)-680-6691, fax: (248)-680-6689, email: craber_at_gemstone.com web: http://www.gemstone.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