Oracle8i Application Developer's Guide - Large Objects (LOBs)
Release 2 (8.1.6)

Part Number A76940-01

Library

Product

Contents

Index

Go to previous page Go to beginning of chapter Go to next page

Advanced Topics, 6 of 6


Creating a Varray Containing References to LOBs

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 Chapter 8, "Sample Application" 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 9, "Internal Persistent LOBs", SQL: Create a Table Containing One or More LOB Columns, .

Example

Suppose you need to store multiple map objects per multimedia clip. To do that follow these steps:

  1. Define a VARRAY of type REF MAP_TYP.

    For example:

    CREATE TYPE MAP_TYP_ARR AS
             VARRAY(10) OF REF MAP_TYP;
    
    
    
  2. Define a column of the array type in 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;
    
    
    
    
    

Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2000, Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index