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 ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |