Oracle9i Application Developer's Guide - Large Objects (LOBs)
Release 1 (9.0.1)

Part Number A88879-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

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

Large Objects: Advanced Topics, 7 of 9


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 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, .

Creating a Varray Containing LOB References: 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-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback