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: Object Types

Re: Object Types

From: Finn Ellebaek Nielsen <fen_at_changegroup.dk>
Date: Thu, 24 Jun 1999 21:40:53 +0100
Message-ID: <7ku1n9$led$1@news.inet.tele.dk>


<saks1000_at_my-deja.com> wrote in message news:7ktj1m$8s4$1_at_nnrp1.deja.com...
> Can anybody help? It seems that Oracle does not support evolution of
> object types. The problem goes back to simpler concepts:
>
> In an M to N relation, where each entity is an object table, I have to
> have a mutual collection of objects. So each entity needs the other to
> be defined properly. How can I resolve this problem in Oracle? Or is
> there not a solution?
>
>
> M to N relation: A club can have many persons as members. A person can
> be a member of many clubs.
>
> If 'club' and 'person' are object types, how can they be defined in a
> proper manner the FIRST time?
>
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.

You can make forward declarations like:

create or replace type t1 as object;
/

/* T1 is compiled with errors but you can ignore that for now. */

create or replace type t2 as object (
  o t1
);
/

/* T2 is compiled with errors but you can ignore that for now. */

create or replace type t1 as object (
  x number
);
/

/* T1 is now OK. */

alter type t2 compile;

/* T2 is now OK. */

As long as the type isn't used in an object table you can change it.

HTH. Finn Received on Thu Jun 24 1999 - 15:40:53 CDT

Original text of this message

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