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

Home -> Community -> Usenet -> c.d.o.server -> Re: Some questions about object definition in Oracle 8 DBMS ...

Re: Some questions about object definition in Oracle 8 DBMS ...

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Tue, 19 May 1998 18:29:35 GMT
Message-ID: <3563ce6a.19141664@192.86.155.100>


A copy of this was sent to Claudio d'Anzeo <danzeo_at_mailer2.cefriel.it> (if that email address didn't require changing) On Tue, 19 May 1998 14:20:58 +0200, you wrote:

>Hi all,
>
>i'm an italian master student in Information Technology and i'm working
>on Oracle 8:
>i'm modeling with Unified Modeling Language (UML) a new
>object-relational database
>which represents a generic telecommunication network.
>
>I have three questions about a new UDT definition:
>
>1) could i create a new OBJECT TYPE with an attribute VARRAY of REF?

Yes:

SQL> create type foobar_type as object

  2  (       x       int,
  3          y       int

  4 )
  5 /
Type created.
SQL> show errors
No errors.

SQL> create type foobar_varray_type as varray(100) of REF foobar_type   2 /
Type created.
SQL> show errors
No errors.

>2) an attribute REF could point to a generic undefined object (like
>NULL) and could be 'casted' after?

No, you have to declare types that contain REFS as having a REF to some particular type of object currently.

>3) what's the scope of a new object defined as component of another
>object?
>

Ambigous question sortof. An object defined as a component of another object doesn't really exist (its not an object really, its a member of an object).

"objects" defined within other objects exist only inside that object instance. They don't have an identity outside of that object. They don't have an OID. You cannot REF them. Only top level objects have these properties.

>Thanks in advance,
>Claudio.
 

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA  

http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Tue May 19 1998 - 13:29:35 CDT

Original text of this message

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