Oracle9i Application Developer's Guide - Large Objects (LOBs) Release 1 (9.0.1) Part Number A88879-01 |
|
Large Objects: Advanced Topics, 7 of 9
LOBs, or rather references to LOBs, can also be created using VARRAYs. To create a VARRAY containing references to LOBs read the following:
Column, MAP_OBJ of type MAP_TYP, already exists in table Multimedia_tab
. See Appendix B, "The Multimedia Schema Used for Examples in This Manual" for a description of table Multimedia_tab
. Column MAP_OBJ contains a BLOB column named DRAWING.
The syntax for creating the associated types and table Multimedia_tab
is described in Chapter 10, "Internal Persistent LOBs", SQL: Create a Table Containing One or More LOB Columns, .
Suppose you need to store multiple map objects per multimedia clip. To do that follow these steps:
For example:
CREATE TYPE MAP_TYP_ARR AS VARRAY(10) OF REF MAP_TYP;
Multimedia_tab.
For example:
CREATE TABLE MULTIMEDIA_TAB ( ......etc. [list all columns here] ... MAP_OBJ_ARR MAP_TYP_ARR) VARRAY MAP_OBJ_ARR STORE AS LOB MAP_OBJ_ARR_STORE;
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|