Database Reference
In-Depth Information
Figure 18.6
A System-
Generated OID
Index
(OIDX_INSTRU
MENTS).
Now let's create multiple layers of types and make subtypes noninsert-
able. We must drop tables and types in the proper order. We will also clean
up at the end of the script.
DROP TABLE INSTRUMENTS;
DROP TYPE INSTRUMENTTYPE;
CREATE OR REPLACE TYPE INSTRUMENTTYPE AS OBJECT(
INSTRUMENT_ID NUMBER
, NAME VARCHAR2(32));
/
CREATE OR REPLACE TYPE SECTIONTYPE AS OBJECT(
SECTION_ID NUMBER);
/
CREATE TABLE SECTIONS OF SECTIONTYPE
NOT SUBSTITUTABLE AT ALL LEVELS
(SECTION_ID PRIMARY KEY)
OBJECT IDENTIFIER IS PRIMARY KEY;
DROP TYPE INSTRUMENTTYPE;
DROP TABLE SECTIONS;
DROP TYPE SECTIONTYPE;
Search WWH ::




Custom Search