Skip Headers
Oracle® Multimedia OraDAV Driver Guide
11g Release 1 (11.1)

Part Number B28418-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

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

2 OraDAV Container System Tables and Views

When you create a container, a set of OraDAV system tables and views is created to provide the infrastructure for the container. The options you choose when creating containers affect the content of the OraDAV system tables and views. These options are described in Section 2.1.

The following SQL procedures are provided for administrators to create and delete containers:

The orddavcc.sql procedure creates a container that is used by OraDAV to maintain information and perform operations. The name of each table and view in that container begins with the value of the <Container Name> option.

The orddavdc.sql procedure lets you delete a container from the SQL command line.

2.1 Options for Creating Oracle Multimedia Containers

When you create Oracle Multimedia containers, you use the following options.

Note:

The logic to create a container will back out of the creation of DDL objects if it cannot complete the entire operation.

Container Name

This option is a prefix of 20 characters or less. The value you enter in this option will serve as a prefix for all the tables, views, indexes, sequences, triggers, and tablespaces that are created for the container. Choose a container name whose prefix will not cause namespace clashes with other data definition language (DDL) objects that have already been created in the schema. The default value is oradav.

Container Size

This option is the size of the storage you want to allocate for the content. The value you enter in this option is an integer that represents megabytes of storage. Choose a number that will not exhaust the disk space on the system where Oracle is running. When the container is created, two tablespaces are generated. Twenty percent of the storage allocation is used to create a tablespace that holds the OraDAV auxiliary tables, including all of the DDL objects created for the container. The remaining eighty percent of the storage allocation is used to create another tablespace that is dedicated to the storage of media. The default value is 1000. The minimum value is 100.

Note:

The size of the container dictates how long the orddavcc.sql script will run. If you are creating a large amount of storage, expect a long delay before the script returns control and reports that it has completed.

NoExecute

This option is supported if you only want to generate a script for creating the container, without executing any DDL. You can execute this script in SQL*Plus later. Use this option after familiarizing yourself with the system tables created, and when you want to tune the physical storage characteristics of the container tables. The default value is n.

LogFileDirectory

This option works in conjunction with the LogFile option. It prompts you for a file directory to which the Oracle database has been configured to write using the UTL_FILE utility. Logging is done by the server on the server system, rather than by SQL*Plus or the client. There is no default value.

LogFile

This option works in conjunction with the LogFileDirectory option. It enables you to enter a name for the log file when the LogFileDirectory option is set. The default value is container_install.sql.

This option is a file that will capture all DDL generated while creating a container. This is useful for re-creating the container or tuning storage attributes. This option uses UTL_FILE directives.

Trace Output

This option enables tracing. Tracing is an alterative way of letting you see the DDL that is generated. Tracing output is raw DDL that is generated, and that is less readable than the log file. Tracing output is a good way to see what was built, or to debug problems with the DDL that is executed.

Entering a value of y causes DDL to be generated and sent to serveroutput. In addition, you must enter the following command in SQL*Plus:

SET SERVEROUTPUT ON

The default value is n.

Add index.html

This option lets you verify the successful creation of a container using a Web browser. Entering a value of y causes a small index.html file to be added to the container that is being created. This index.html file can later be deleted or overwritten with any DAV client. The default value is y.

Use Oracle Multimedia objects

This option lets you specify the storage method for Oracle Multimedia media files. Entering a value of y causes the media files to be stored in three separate tables of ORDImage, ORDAudio, and ORDVideo objects. Otherwise, all files will be stored as BLOBs. The default value is y.

Tablespace datafile directory

This option lets you specify the server directory where you want the tablespace data files for the container to be created. Enter the desired server directory (including the trailing slash, if appropriate). If no server directory is specified, the default location for your database will be used.

2.2 OraDAV System Tables and Views

Table 2-1 lists each of the OraDAV system tables and views, where <xxx> represents the value of the <Container Name> option.

Table 2-1 Container System Tables and Views

Table or View Description

<xxx>$ACE

Access control entry

<xxx>$ASL

Advanced searching and locating

<xxx>$AUDIO

Content storage for ORDAudio files, if the value of the <Use Oracle Multimedia objects> option is Y

<xxx>$BLOB

Content storage for files other than ORDAudio, ORDVideo, or ORDImage files, if the value of the <Use Oracle Multimedia objects> option is Y. Or, content storage for all media files, if the value of the <Use Oracle Multimedia objects> option is N

<xxx>$CONTAIN

Container identifier

<xxx>$CONTAINER

Information used internally to identify, maintain, and track the container

<xxx>$CONTENT

Lists content to storage mapping

<xxx>$IMAGE

Content storage for ORDImage files, if the value of the <Use Oracle Multimedia objects> option is Y

<xxx>$LOCKS

DAV locks

<xxx>$MIME

MIME mapping and content types

Modifications to this table are allowed. For more information about this table, see Section 2.2.1.

<xxx>$PATH

Hierarchy of path names

<xxx>$PRINCIPAL

User names and authorization information

<xxx>$PROP

Property information for resources

Modifications to this table are allowed. For more information about this table, see Section 2.2.2.

<xxx>$RESOURCE

Convenience view that selects certain columns from xxx$PATH and xxx$ASL based on an equijoin of their DOC_ID columns

<xxx>$STORE

Table for registering storage areas used in partitioning files by MIME type, if the value of the <Use Oracle Multimedia objects> option is Y

<xxx>$TBLOB

Temporary table used for generated content

<xxx>$VIDEO

Content storage for ORDVideo files, if the value of the <Use Oracle Multimedia objects> option is Y


Note:

With the exception of <Container Name>$MIME and <Container Name>$PROP, these tables and views are read-only.

2.2.1 <Container Name>$MIME Table

The <Container Name>$MIME table contains information about MIME mapping and content types. Modifications to this table are allowed.

Table 2-2 describes the columns in the <Container Name>$MIME table.

Table 2-2 Columns in the <Container Name>$MIME Table

Column Name Data Type Explanation

EXTENSION

VARCHAR2(30)

A file extension typically used by files of a specified content type. The period must be included in the extension. For example: .jpg

PREFERRED_EXT

VARCHAR2(1)

The value is T if EXTENSION is the file extension to be used by OraDAV when generating files of the associated content type; the value is F if EXTENSION is not to be used in this case. This value is most important when a content type is associated with multiple extensions. For example, if image/jpeg is associated with the .jpg, .jpeg, and .jpe extensions, you must specify one with PREFERRED_EXT as T.

CONTENTTYPE

VARCHAR2(80)

MIME type typically associated with a file with the extension. For a given CONTENTTYPE, there must be one (and only one) PREFERRED_EXT set to T. (See the explanation for the PREFERRED_EXT column name.)

ANNOLEVEL

VARCHAR2(1)

Degree to which data for the content type should be annotated: D (detailed) or S (summary). Ignored if the ANNOROUTINE column is null.

ANNOROUTINE

VARCHAR2(108)

Annotation routine: the name of the PL/SQL procedure to be called to perform the annotation. The name of the annotation routine should be qualified with the schema and package name, if necessary. The proper privileges and access rights must have been granted to enable the database schema in which the container was created to execute the annotation routine.

STORAGE_AREA

VARCHAR2(30)

Storage identifier, corresponding to a STORAGE_AREA column value in the xxx$STORE table (described in Table 2-1). For example, if the STORAGE_AREA value for image/jpeg is IMAGE, then all files of this CONTENTTYPE, at file creation time, will be inserted and stored in the storage area with storage identifier IMAGE.


The ANNOLEVEL and ANNOROUTINE values are not used unless the ORAAnnotate parameter is set to TRUE in the <Location> directive in the Oracle HTTP Server OraDAV configuration file. The ORAAnnotate parameter controls the automatic extraction and storage of properties from resources. If this parameter is set to TRUE, an OraDAV-enabled Oracle HTTP Server performs the following additional actions whenever a resource is added to a collection:

  • It selects the following from the <Container Name>$MIME table in the container: the name of the PL/SQL procedure to call to perform the annotation, and annotation level (either summary or detailed).

  • It invokes the annotation routine, passing the following parameters: an XML string (described in Section 3.4) representing the context parameter, the OraDAV document ID for the resource being annotated, the BLOB handle for the resource's data, and the annotation level (S for summary, D for detailed). The annotation routine is expected to parse attributes from the resource's data and store them as properties in the container's <Container Name>$PROP table (described in Section 2.2.2). If the annotation level is S, all the properties are concatenated into one XML string and stored as a single property in the <Container Name>$PROP table. If the annotation level is D, each property is stored as its own row in the <Container Name>$PROP table.

The following example displays a row from the <Container Name>$MIME table. (The output is slightly reformatted for readability.)

SQL> SELECT * FROM test$mime WHERE extension='.jpg';
 
EXTENSION PREFERRED_EXT CONTENTTYPE ANNOLEVEL  ANNOROUTINE   STORAGE_AREA 
 
---------------------------------------------------------------------------
 
 .jpg        T            image/jpeg   D                       IMAGE

You can modify the <Container Name>$MIME table to perform any of the following tasks:

  • Add rows to support additional content types.

  • Change the storage areas used for newly added objects for certain content types. (Existing objects remain in their current storage areas.)

  • Add or change the annotation routine to be called for a particular content type.

2.2.2 <Container Name>$PROP Table

The <Container Name>$PROP table contains information about resource properties. Modifications to this table are allowed.

Table 2-3 describes the columns in the <Container Name>$PROP table.

Table 2-3 Columns in the <Container Name>$PROP Table

Column Name Data Type Explanation

DOC_ID

NUMBER(38)

Internal document identifier. DOC_ID values are unique and never reused.

NAMESPACE

VARCHAR2(538)

XML namespace associated with this property. Used to avoid ambiguity if there are duplicate TAG values.

TAG

VARCHAR2(100)

Name assigned to the property. Used with NAMESPACE to identify the property.

LANGUAGE

VARCHAR2(100)

Language in which the property is written.

DESCRIPTION

VARCHAR2(4000)

Additional information (if any) about the property.

DEADORLIVE

VARCHAR2(1)

A value of D represents a dead (static) property. A value of L represents a live (dynamic) property. Dead properties are not derived directly from the document; they are created and maintained by the client. Live properties are derived directly from the document's content; they are maintained by the server, and most cannot be modified by the client.

READONLY

VARCHAR2(1)

Indicates whether the property is read-only: T (True) or F (False).

PROPV_TYPE

VARCHAR2(30)

Data type for the property: VARCHAR2, DATE, NUMBER, or CLOB.

VAL_VARCHAR2

VARCHAR2(4000)

If PROPV_TYPE is VARCHAR2, the value for the property.

VAL_CLOB

CLOB

If PROPV_TYPE is CLOB, the value for the property.

VAL_DATE

DATE

If PROPV_TYPE is DATE, the value for the property.

VAL_NUMBER

NUMBER

If PROPV_TYPE is NUMBER, the value for the property.


It is appropriate for writers of annotation routines to make insertions into the <Container Name>$PROP table (but not into other container tables, with the possible exception of the <Container Name>$MIME table).

Note:

If a document is being overwritten, all existing live properties will be deleted before an annotation routine is called.