Oracle8i Administrator's Reference
Release 8.1.5 for Sun SPARC Solaris

A67456-01

Library

Product

Contents

Index

Prev Next

6
Running Oracle Data Option Demos

Additional Documentation

The following documents provide in-depth information about the Oracle options available in release 8.1.5:

Oracle8i interMedia

Oracle8i interMedia includes the following components:

Text

See AlsoOracle8i interMedia Text Reference, and Oracle8i ConText interMedia Text Migration. 

There are no demos for Text in Oracle8i.

Audio, Video, and Image

See AlsoOracle8i interMedia Audio, Image, and Video User's Guide and Reference and Oracle8i interMedia Audio, Image, and Video Java Client User's Guide and Reference. 

Oracle8i interMedia includes a number of 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 audio scripts consist of the following files:

checking interMedia objectscreating a sample table with audio in itinserting NULL rows into the audio tablechecking the rows outchecking all the audio attributes directlychecking all the audio attributes by calling methodsinstalling your own format plug-in using the two files, fplugins.sql and fpluginb.sql described in the next two list items and in Oracle8i interMedia Audio, Image, and Video User's Guide and Reference on how to extend interMedia Audio to support a new audio data format

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

Sample Program for Modifying Images or Testing the Image Installation

Once you have installed Oracle8i interMedia Image, you may choose to run the Oracle8i interMedia Image demonstration program. This program can also be used as a test to confirm successful installation.

This section contains the steps required to build and run the interMedia image demo.

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

Demonstration (Demo) Installation Steps
  1. The Oracle8i interMedia Image demo uses the SCOTT/TIGER database user. If this user does not exist, you must create it:

    % svrmgrl     
    SVRMGRL> connect internal;     
    SVRMGRL> create user SCOTT identified by tiger;     
    SVRMGRL> grant connect,resource to SCOTT;
    
    
  2. Create the image demo directory where $ORACLE_HOME is 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 needed, make the imgdemo program.

    % cd $ORACLE_HOME/ord/img/demo     
    % make -f demo_ordimg.mk imgdemo
Running the Demo

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

The program operates on imgdemo.dat, which is a bitmap (BMP) image in the demo directory. Optionally, you can supply an image file name on the command line, provided the file resides in the same directory as the demo. In either case, once the image has been manipulated by Oracle8i interMedia Image, the resulting image is written to the file imgdemo.out and can then be viewed with common rendering tools that you supply.

When the demo is run, 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 demo data. Once 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 JFIF using the
processCopy( ) method of ORDImage.

The image properties are extracted within the database using the setProperties( ) method. An UPDATE command is issued after the setProperties( ) invocation. This is required because the setProperties( ) invocation has only updated a local copy of the type attributes.

Next, the Oracle8i interMedia Image process( ) method is used to cut and scale the image within the database. This is followed by an update that commits the change. The program 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.

Execute the Demo from the Command Line

Execute the demo by typing imgdemo on the command line. Optionally, you can use a different image in the demo by first copying the file to the directory in which the demo resides and then specifying its file name on the command line as an argument to imgdemo.

Use the following command:

$ imgdemo optional-image-filename

The demo displays a number of messages describing its progress, along with any errors encountered if something was not set up correctly. 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 Image software has not been installed correctly or the database has not been started. If the program completes successfully, the original image and the resultant image, which has undergone the cutting and scaling described earlier, can be viewed with common image rendering tools.

Sample Video Scripts

The Video scripts consist of the following files:

checking interMedia objectscreating a sample table with video in itinserting NULL rows into the video tablechecking the rows outchecking all the video attributes directlychecking all the video attributes by calling methodsinstalling your own format plug-in using the two files, fplugins.sql and fpluginb.sql described in the next two list items and in Oracle8i interMedia Audio, Image, and Video User's Guide and Reference on how to extend interMedia Video to support a new video data format

See the README.txt file in the $ORACLE_HOME/ord/vid/demo directory for requirements and instructions on how to run this SQL demo.

Java Demo

A Java demo has been provided to help you learn to use both the audio and video client-side Java classes so you can build your own applications. In these two demos, the audio and video object is instantiated at the client side and a number of accessor methods are invoked. The audio Java demo files are located in the
ORACLE_HOME/ord/aud/demo directory and the video Java demo files are located in the $ORACLE_HOME/ord/vid/demo directory. See the README.txt file in each directory for requirements and instructions on how to run each respective Java demo.

MediaAnnotator

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

http://www.oracle.com/products/free_software/

Locator

See AlsoOracle8i interMedia Locator User's Guide and Reference. 

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

Sample Scripts

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

$ORACLE_HOME/md/demo/geocoder

These scripts consist of the following files:

This file contains two parts. One part is for running a geocode function in interactive mode and the other is for running the geocode function in batch mode.Interactive mode.See Example 1 in "GEOCODE1 Function (with lastline field)"in the Oracle8i interMedia Locator User's Guide and Reference for a listing of this part of the file.Batch mode.You must update the setup tables in the nh_cs.sql file before you run the geohttp.sql in batch mode. See the following examples in the Oracle8i interMedia Locator User's Guide and Reference: Example 2 in "GEOCODE1 Function (with lastline field)"or Example 3 in "GEOCODE1 Function (with lastline field)"for a listing of this part of the file. This file contains:A function named ESTIMATE_LEVEL to better estimate the index level for use with the spatial locator index for within-distance queries that use a radius distance greater than 100 miles. See the example in "ESTIMATE_LEVEL"in the Oracle8i interMedia Locator User's Guide and Reference for a listing of this file.A procedure statement named SETUP_LOCATOR_INDEX that builds a setup spatial locator index on the location column that contains the spatial information within the cust_table table where the spatial information is stored. See the example in "SETUP_LOCATOR_INDEX" in Oracle8i interMedia Locator User's Guide and Reference for a listing of this file. This file contains a routine that dynamically creates a geometry of interest and then queries against the NH_COMPUTER_STORES table to find out how many stores are within a 10-mile radius of the office. See Example 2 in "LOCATOR_WITHIN_DISTANCE" Oracle8i interMedia Locator User's Guide and Reference for a listing of this file.

Web Agent and Clipboard

See AlsoUsing Oracle8i interMedia with the Web 

For this release, two components of Oracle8i interMedia, the Clipboard and Web Agent, are not available on the Oracle8i media. You can download the components from the Free Software download area of the Oracle Corporation web site:

http://www.oracle.com/products/free_software/index.html

The documentation, which includes README files and the manual Using Oracle8i interMedia with the Web, is included in the download.

Oracle8i Time Series Demos

See AlsoOracle8i Time Series User's Guide 

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

Oracle8i Time Series Demos  
Description  Directory 
Quick-start demo: quick and easy start using Oracle8i Time Series (See Chapter 1 in Oracle8i Time Series User's Guide. demo/tsquick 
Usage demo for end users and product developers who want to use existing Oracle8i Time Series features (See Chapter 1 in Oracle8i Time Series User's Guide.)  demo/usage 
Electric utility application demonstrating how to compute peak and off-peak summaries of 15-minute data  demo/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 Chapter 1 in Oracle8i Time Series User's Guide.)  demo/applet 
Simple Java code segments that perform time series operations and print the results (See Chapter 1 in Oracle8i Time Series User's Guide.)  demo/java 
Demo showing the use of administrative tools procedures to "retrofit" existing time series detail tables; also, how to support time series queries for multiple qualifier columns in the time series detail table.  demo/retrofit 
Advanced-developer demo for those who want to extend Oracle8i Time Series features  demo/extend 
OCI demo showing how to call Oracle8i Time Series functions using the Oracle Call Interface  demo/oci 
PRO*C/C++ demo showing how to call Oracle8i Time Series functions in applications created using the Oracle Pro*C/C++ Precompiler  demo/proc 
Oracle Developer demo showing how to call Oracle8i Time Series functions in an Oracle Forms application  demo/dev2k 

The README.txt file in the demo directory introduces the demos. Also, the directory for each demo contains a README.txt file with a more detailed description of that demo.

Oracle8i Visual Information Retrieval

See AlsoOracle8i Visual Information Retrieval User's Guide and Reference and Oracle8i Visual Information Retrieval Java Client User's Guide and Reference 

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

This 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:

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-2 runs the sample program using the included image files. The images are compared using equal attribute weights:

Run the Sample Program with Included Images% virdemoImage 1 and 2 have a similarity score of 0.0

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

Run the Sample Program with Your Own Images% virdemo image1 image2 global_color local_color texture structure

All six parameters: the 2 file names and 4 attribute weights (ranging from 0.0 to 1.0) must be specified in this sample program. Note that when using the VIRScore( ) operator in your own applications, it is only necessary to provide at least one attribute weight.

Several other sample image files have been provided in the VIRDEMODIR directory 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 AlsoAppendix B in the Oracle8i Visual Information Retrieval User's Guide and Reference for more information. 

Oracle8i Spatial

See AlsoOracle8i Spatial User's Guide and Reference 

Oracle8i Spatial does not contain any demos.



Prev Next
Oracle
Copyright © 1999 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index