Unix Technical Forum

NESTED TABLE ... how to SCOPE?

This is a discussion on NESTED TABLE ... how to SCOPE? within the Oracle Database forums, part of the Database Server Software category; --> Does anybody know how to do this (I'm trying to simulate RI (scoping) on a nested table ... here ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-24-2008, 12:53 PM
Domenic
 
Posts: n/a
Default NESTED TABLE ... how to SCOPE?

Does anybody know how to do this (I'm trying to simulate RI (scoping)
on a nested table ... here is a generic example that doesn't seem to
work completely ...

CREATE TYPE lookup_typ
AS OBJECT
(
lookup_id NUMBER(1,0),
lookup_desc VARCHAR2(100)
)
/

CREATE TABLE lookup_t
OF lookup_typ (lookup_id CONSTRAINT pk_lookup_lookuptyp PRIMARY KEY)
OBJECT IDENTIFIER IS PRIMARY KEY
/

CREATE TYPE item
AS OBJECT
(
item_id NUMBER(1,0),
lookup_id REF lookup_typ
)
/

CREATE TYPE items AS TABLE OF item
/

CREATE TABLE any_table (regular column_list ..., column9 ITEMS)
NESTED TABLE column9 STORE AS whatever
/

Can there be "RI" on the nested table on the lookup_id column? How
can it be scoped at the table level. Oracle does not seem to allow
scoping at the CREATE TYPE level.

At this point I get stuck. I can't seem to insert or do anything
without getting errors. I thought the "OBJECT IDENTIFIER IS PRIMARY
KEY" would get rid of those long OIDs Oracle generates, but no luck.

Any help would be appreciated. I don't think the object-relational
features of Oracle are that well documented. Thanks ... Dom
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:44 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com