Oracle8i Administrator's Reference
Release 3 (8.1.7) 64 Bit for SGI IRIX

Part Number A87435_01
Go To Documentation Library
Library
Go To Product List
Product
Go To Table Of Contents
Contents
Go To Index
Index

Go to previous page Go to next page

6
Running Oracle Data Option Demonstrations

This chapter describes Oracle Data Option demonstrations. It contains the following sections:

Oracle8i interMedia

Oracle8i interMedia includes the following components:

Text

There are no demonstrations for interMedia Text in Oracle8i. However, interMedia Text now includes code samples. Use a web browser to open the following file:

$ORACLE_HOME/ctx/sample/api/index.html

See Also:

For more information on intermedia Text, see the Oracle8i interMedia Text Reference, and the Oracle8i ConText interMedia Text Migration guide. 

Audio, Video, and Image

Oracle8i interMedia includes audio, video, and image scripts and sample programs in the following directories:

$ORACLE_HOME/ord/aud/demo/
$ORACLE_HOME/ord/img/demo/
$ORACLE_HOME/ord/vid/demo/

Sample Audio Scripts

The interMedia audio scripts consist of the following files:

See the README.txt file in the $ORACLE_HOME/ord/aud/demo directory for requirements and instructions on running this SQL demonstration.

Sample Program for Modifying Images or Testing the Image Installation

After you have installed Oracle8i interMedia Image, you can run the Oracle8i interMedia Image demonstration program. You can also use this program to confirm successful installation.

This section lists the steps required to build and run the interMedia Image demonstration.

The interMedia Image demonstration files are located in the $ORACLE_HOME/ord/img/demo directory, where $ORACLE_HOME is the Oracle home directory.

Demonstration Installation Steps

To install the Oracle8i interMedia Image demonstration:

  1. Create the SCOTT/TIGER database user, if this user does not exist:

    $ svrmgrl     
    SVRMGRL> CONNECT INTERNAL;     
    SVRMGRL> CREATE USER SCOTT IDENTIFIED BY TIGER;     
    SVRMGRL> GRANT CONNECT,RESOURCE TO SCOTT;
    
    
  2. Create the image demonstration directory in the Oracle home directory:

    $ svrmgrl     
    SVRMGRL> CONNECT INTERNAL;     
    SVRMGRL> CREATE OR REPLACE DIRECTORY IMGDEMODIR AS '$ORACLE_
    HOME/ORD/IMG/DEMO';
    
    
  3. Grant privileges on the directory to PUBLIC:

    SVRMGRL> grant read on directory imgdemodir to public with grant option;
    
    
  4. If required, make the imgdemo program:

    $ cd $ORACLE_HOME/ord/img/demo     
    $ make -f demo_ordimg.mk imgdemo
    

Running the Demonstration

The imgdemo file is a sample program that shows how Oracle8i interMedia Image can be used from within a program. The demonstration is written in C and uses the Oracle Call Interface (OCI) to access the database and exercise Oracle8i interMedia Image.

The program operates on the imgdemo.dat file, which is a bitmap (BMP) image in the demonstration directory. Optionally, you can supply the name of an image file on the command line, provided that the file is located in the same directory as the demonstration. In either way, after the image has been manipulated by Oracle8i interMedia Image, the resulting image is written to the imgdemo.out file. You can then view the image with an image viewer such as xv.

When you run the demonstration, it deletes and re-creates a table named IMGDEMOTAB in the SCOTT/TIGER schema of the default database. This table is used to hold the demonstration data. After the table is created, a reference to the image file is inserted into the table. The data is then loaded into the table and converted to the JFIF format using the processCopy( ) method of ORDImage.

The demonstration extracts the image properties from the database using the setProperties( ) method. After the demonstration runs setProperties( ) it issues an UPDATE command. This is required because setProperties( ) only updates a local copy of the type attributes.

Next, the demonstration uses the Oracle8i interMedia Image process( ) method to cut and scale the image within the database. The demonstration then runs an update that commits the change. The demonstration cuts a portion of the image 100 pixels wide by 100 pixels high starting from pixel location (100,100). This sub-image is scaled to twice its original size and the resulting image is written to a file named imgdemo.out in the current directory.

Executing the Demonstration from the Command Line

To execute the demonstration, enter:

$ imgdemo [image-file]

The optional image file must be located in the same directory as the demonstration program. The demonstration displays a number of messages describing its progress, along with any errors it encounters. Expect to see the following messages:

Dropping table IMGDEMOTAB... 
Creating and populating table IMGDEMOTAB... 
Loading data into cartridge... 
Modifying image characteristics... 
Writing image to file imgdemo.out... 
Disconnecting from database... 
Logged off and detached from server. 
Demo completed successfully. 
 

If the program encounters any errors, it is likely that either Oracle8i interMedia software has not been installed correctly or the database has not been started. If the program completes successfully, you can view the original image and the resultant image which has undergone the cutting and scaling described previously, with an image viewer such as xv.

Sample Video Scripts

The interMedia Video scripts consist of the following files:

Java Demonstration

Oracle8i interMedia Locator includes a Java demonstration to help you learn to use both the audio and video client-side Java classes for building your own applications. These two demonstrations instantiate the audio and video object at the client side and start a number of accessor methods. The audio Java demonstration files are located in the $ORACLE_HOME/ord/aud/demo directory and the video Java demonstration files are located in the $ORACLE_HOME/ord/vid/demo directory.

See Also:

See the README.txt file in each directory for requirements and instructions on running each Java demonstration. 

.

MediaAnnotator

The MediaAnnotator program is not contained on the Oracle8i interMedia CD. It (along with other free Oracle software) is available at the following URL:

http://technet.oracle.com/software/products/intermedia/software_index.htm

See Also:

See the Oracle8i interMedia Audio, Image, and Video User's Guide and Reference and Oracle8i interMedia Audio, Image, and Video Java Client User's Guide and Reference for more information on MediaAnnotator. 

Locator

Oracle8i interMedia Locator includes a number of scripts that you can modify and run.

See Also:

See the Oracle8i interMedia Locator User's Guide and Reference for more information on interMedia Locator. 

Sample Scripts

Sample Oracle8i interMedia Locator scripts are available in the following directory after you install interMedia Locator:

$ORACLE_HOME/md/demo/geocoder

These scripts consist of the following files:

Web Agent and Clipboard

The Web Agent and Clipboard are not contained on the Oracle8i intermedia CD. They (along with other free Oracle software) are available at the following URL:

http://technet.oracle.com/software/products/intermedia/software_index.htm

See Also:

See Using Oracle8i interMedia with the Web for more information on Web Agent. 

Oracle8i Time Series Demonstrations

Table 6-1 shows the demonstrations included with Oracle8i Time Series. This table includes a description of each demonstration and the default directory in which its files are installed.

In the following table, all directories listed are sub directories of the $ORACLE_HOME/ord/ts/demo directory:

Table 6-1 Oracle8i Time Series Demonstrations  
Description  Sub Directory 

Quick-start demonstration: quick start using Oracle8i Time Series. (See the Oracle8i Time Series User's Guide for more information). 

tsquick 

Usage demonstration for end users and product developers who want to use existing Oracle8i Time Series features. (See the Oracle8i Time Series User's Guide). 

usage 

Electric utility application demonstrating how to calculate peak and off-peak summaries of 15-minute data. 

usageutl 

Java-based retrieval of time series data, using the prototype Oracle8i Time Series Java API and designed to run in a Web browser. (See the Oracle8i Time Series User's Guide for more information). 

applet 

Simple Java code segments that perform time series operations and print the results. (See the Oracle8i Time Series User's Guide for more information). 

java 

Demonstration showing the use of administrative tools procedures to "retrofit" existing time series detail tables. Demonstration showing how to support time series queries for multiple qualifier columns in the time series detail table. 

retrofit 

Advanced-developer demonstration for those who want to extend Oracle8i Time Series features. 

extend 

OCI demonstration showing how to call Oracle8i Time Series functions using the Oracle Call Interface. 

oci 

PRO*C/C++ demonstration showing how to call Oracle8i Time Series functions in applications created using the Oracle Pro*C/C++ Precompiler. 

proc 

Oracle Developer demonstration showing how to call Oracle8i Time Series functions in an Oracle Forms application. 

dev2k 

The README.txt file in the demonstration directory introduces the demonstrations. In addition, the directory for each demonstration contains a README.txt file with a more detailed description of that demonstration.

See Also:

See the Oracle8i Time Series User's Guide for more information on Oracle Time Series demonstrations. 

Oracle8i Visual Information Retrieval

A sample program is included with Visual Information Retrieval. The sample program demonstrates how to load two images into the database, generate their signatures, and then compare their signatures using a weighted similarity function.

The sample program uses two data files, virdemo1.dat and virdemo2.dat, as its input. No other input or parameters are required.

Environment

The following assumptions are made about the environment:

Running the Sample Program

There are two ways to run the sample program: using the included sample images, or using your own images.

Example 6-1 runs the sample program using the included image files. The images are compared using equal attribute weights:

Example 6-1 Run the Sample Program with Included Images

% virdemo
Image 1 and 2 have a similarity score of 0.0

Example 6-2 shows how to specify your own images on the command line. The images be located in the $ORACLE_HOME/ord/vir/demo directory.

Example 6-2 Run the Sample Program with Your Own Images

% virdemo image1 image2 global_color local_color texture structure

You must specify all six parameters; the two file names and the four attribute weights (ranging from 0.0 to 1.0) in this sample program. Note that when using the VIRScore( ) operator in your own applications, you only need to provide one attribute weight.

The Visual Information Retrieval demonstration directory provides several other sample image files to demonstrate the effects of emphasizing the different visual attributes. You can use an image viewer (such as xv) to display the images, and then compare them using the sample program, experimenting with different weights.

See Also:

See the Oracle8i Visual Information Retrieval User's Guide and Reference and Oracle8i Visual Information Retrieval Java Client User's Guide and Reference for more information on Visual Information Retrieval. 

Oracle8i Spatial

For information on Oracle8i Spatial, see the $ORACLE_HOME/md/demo/readme.txt file and the Oracle8i Spatial User's Guide and Reference.


Go to previous page Go to next page
Oracle
Copyright © 2001 Oracle Corporation.

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