Oracle® interMedia Reference 10g Release 1 (10.1) Part Number B10829-01 |
|
|
View PDF |
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.
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;
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;
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;