Skip Headers

Oracle® interMedia Reference
10g Release 1 (10.1)

Part Number B10829-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to previous page
Previous
Go to next page
Next
View PDF

Example Media Table and User Definition

The methods described in this reference chapter show examples based on a media table SI_MEDIA. Refer to the SI_MEDIA table definition that follows when reading through the examples. Before using methods, you will need to load some data into the table using one of the examples provided with the reference information for each object type's constructors.


SI_MEDIA Table Definition
CREATE TABLE PM.SI_MEDIA(
  PRODUCT_ID NUMBER(6),
  PRODUCT_PHOTO SI_StillImage,
  AVERAGE_COLOR SI_AverageColor,
  COLOR_HISTOGRAM SI_ColorHistogram,
  FEATURE_LIST SI_FeatureList,
  POSITIONAL_COLOR SI_PositionalColor,
  TEXTURE SI_Texture,
  CONSTRAINT id_pk PRIMARY KEY (PRODUCT_ID));
COMMIT;


PM.IMAGETAB Table Definition

Create this table in preparation for the Example 2 for the SI_StillImage(content) method, which begins:

CREATE TABLE PM.IMAGETAB (id number, imgblob blob);
COMMIT;


User Ron Definition

For a user "ron" to use the examples, the following statements must be issued before ron executes the examples, where "/mydir" is the directory where ron will find the audio, video, and image data:

CREATE USER ron IDENTIFIED BY ron;
GRANT INSERT, UPDATE, SELECT, DELETE on OE.ORDERS to ron;GRANT INSERT, UPDATE, SELECT, DELETE on PM.ONLINE_MEDIA to ron;
GRANT EXECUTE on SYS.DBMS_LOB to ron;
GRANT CREATE SESSION TO ron;
CREATE OR REPLACE DIRECTORY FILE_DIR as '/mydir';
GRANT READ ON DIRECTORY FILE_DIR TO PUBLIC WITH GRANT OPTION;