Oracle® Multimedia OraDAV Driver Guide 11g Release 2 (11.2) Part Number E10782-01 |
|
|
View PDF |
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 (see 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.
This chapter includes the following sections:
When you create Oracle Multimedia containers, you use the following options.
Note:
The logic to create a container backs 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 serves 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 does not cause namespace clashes with other data definition language (DDL) objects that were 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 theorddavcc.sql
script is to 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 captures 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 are 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 is used.
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 |
<xxx>$BLOB |
Content storage for files other than ORDAudio, ORDVideo, or ORDImage files, if the value of the <Use Oracle Multimedia objects> option is |
<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 |
<xxx>$LOCKS |
DAV locks |
<xxx>$MIME |
MIME mapping and content types Modifications to this table are permitted. 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 permitted. 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 |
<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 |
Note:
With the exception of <Container Name>$MIME and <Container Name>$PROP, these tables and views are read-only.The <Container Name>$MIME table contains information about MIME mapping and content types. Modifications to this table are permitted.
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: |
PREFERRED_EXT |
VARCHAR2(1) |
The value is |
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 |
ANNOLEVEL |
VARCHAR2(1) |
Degree to which data for the content type is to be annotated: |
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 |
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.
The <Container Name>$PROP table contains information about resource properties. Modifications to this table are permitted.
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 |
READONLY |
VARCHAR2(1) |
Indicates whether the property is read-only: |
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 are deleted before an annotation routine is called.