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

Modeling and Design, 5 of 12


How to Create Gigabyte LOBs

LOBs in Oracle8i can be up to 4 gigabytes. To create gigabyte LOBs, use the following guidelines to make use of all available space in the tablespace for LOB storage:

Example: Creating a Tablespace and Table to Store Gigabyte LOBs

A working example of creating a tablespace and a table that can store gigabyte LOBs follows. The case applies to the multimedia application example in Chapter 8, "Sample Application", if the video Frame in the multimedia table is expected to be huge in size, i.e., gigabytes.

CREATE TABLESPACE lobtbs1 datafile '/your/own/data/directory/lobtbs_1.dat' size 
2000M reuse online nologging default storage (maxextents unlimited); 
CREATE TABLESPACE lobtbs1 add datafile '/your/own/data/directory/lobtbs_2.dat' 
size 2000M reuse; 
ALTER TABLESPACE lobtbs1 add datafile '/your/own/data/directory/lobtbs_2.dat'  
size 1000M reuse; 
 
CREATE TABLE Multimedia_tab (  
   Clip_ID         NUMBER NOT NULL,  
   Story           CLOB default EMPTY_CLOB(),  
   FLSub           NCLOB default EMPTY_CLOB(),  
   Photo           BFILE default NULL,  
   Frame           BLOB default EMPTY_BLOB(),  
   Sound           BLOB default EMPTY_BLOB(),  
   Voiced_ref      REF Voiced_typ, 
   InSeg_ntab      InSeg_tab,  
   Music           BFILE default NULL,  
   Map_obj         Map_typ  
   Comments        LONG
 )  
 NESTED TABLE    InSeg_ntab STORE AS InSeg_nestedtab 
 LOB(Frame) store as (tablespace lobtbs1 chunk 32768 pctversion 0 NOCACHE 
NOLOGGING 
 storage(initial 100M next 100M maxextents unlimited pctincrease 0)); 


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