15.45 SEM_APIS.CREATE_SEM_NETWORK

Format

SEM_APIS.CREATE_SEM_NETWORK( 
     tablespace_name  IN VARCHAR2,
     options          IN VARCHAR2 DEFAULT NULL,
     network_owner    IN VARCHAR2 DEFAULT NULL,
     network_name     IN VARCHAR2 DEFAULT NULL);

Note:

This subprogram will be deprecated in a future release. It is recommended that you use the SEM_APIS.CREATE_RDF_NETWORK subprogram instead.

Description

Creates structures for persistent storage of semantic data.

Parameters

tablespace_name

Name of the tablespace to be used for tables created by this procedure. This tablespace will be the default for all models that you create, although you can override the default when you create a model by specifying the model_tablespace parameter in the call to the SEM_APIS.CREATE_SEM_MODEL procedure.

options

An optional quoted string with one or more of the following network creation options:

  • COMPRESS=CSCQH uses COLUMN STORE COMPRESS FOR QUERY HIGH on the RDF_LINK$ and RDF_VALUE$ tables.

  • COMPRESS=CSCQL uses COLUMN STORE COMPRESS FOR QUERY LOW on the RDF_LINK$ and RDF_VALUE$ tables.

  • COMPRESS=RSCA uses ROW STORE COMPRESS ADVANCED on the RDF_LINK$ and RDF_VALUE$ tables.

  • COMPRESS=RSCB uses ROW STORE COMPRESS BASIC on the RDF_LINK$ and RDF_VALUE$ tables. This is the default compression level.

  • MODEL_PARTITIONING=BY_HASH_P uses list-hash composite partitioning to partition RDF_LINK$ by model ID and further subpartition each model by a hash of the predicate ID.

  • MODEL_PARTITIONS=n sets the default number (n) of subpartitions to use for each model. This option is used in conjunction with MODEL_PARTITIONING=BY_HASH_P.

  • MODEL_PARTITIONING=BY_LIST_G uses list-list composite partitioning to partition RDF_LINK$ by model ID and further subpartition each model by graph ID. This subpartition is automatically maintained as data is inserted into the model.

  • NETWORK_MAX_STRING_SIZE=EXTENDED specifies a maximum VARCHAR size of 32767 bytes for storing RDF values. Values larger than 32767 bytes will be stored as CLOBs.

  • NETWORK_MAX_STRING_SIZE=STANDARD specifies a maximum VARCHAR size of 4000 bytes for storing RDF values. Values larger than 4000 bytes will be stored as CLOBs. This is the default.

  • NETWORK_STORAGE_FORM=ESC specifies use of escaped storage form for lexical values in RDF_VALUE$. Unicode characters and special characters will be stored using ASCII escape sequences. (You cannot specify both the escaped and unescaped storage forms.)

  • NETWORK_STORAGE_FORM=UNESC specifies use of unescaped storage form for lexical values in RDF_VALUE$. Unicode characters and special characters will be stored as single characters. This is the default.

network_owner

Owner of the semantic network. (See Table 1-2.)

network_name

Name of the semantic network. (See Table 1-2.)

Usage Notes

This procedure creates system tables and other database objects used for semantic technology support.

You should create a tablespace for the semantic technology system tables and specify the tablespace name in the call to this procedure. (You should not specify the SYSTEM tablespace.) The size needed for the tablespace that you create will depend on the amount of semantic technology data you plan to store.

You must connect to the database as a user with DBA privileges or as the intended network owner in order to call this procedure, and you should call the procedure only once for the database.

To drop these structures for persistent storage of semantic data, you must connect as a user with DBA privileges or as the owner of the schema-private network, and call the SEM_APIS.DROP_SEM_NETWORK procedure.

The options COMPRESS=CSCQH, COMPRESS=CSCQL, and COMPRESS=RSCA should be used only if you have the appropriate licenses.

After the semantic network is created, a row in the RDF_PARAMETER table with NAMESPACE = 'NETWORK' and ATTRIBUTE = 'COMPRESSION' will indicate the type of compression used for the semantic network.

NETWORK_MAX_STRING_SIZE=EXTENDED can only be used if your database has extended VARCHAR support enabled (see Extended Data Types).

For information about semantic network types and options, see RDF Networks.

Examples

The following example creates a tablespace for semantic technology system tables and creates structures for persistent storage of semantic data in this tablespace. Advanced compression is used for the semantic network.

CREATE TABLESPACE rdf_tblspace
 DATAFILE '/oradata/orcl/rdf_tblspace.dat' SIZE 1024M REUSE
 AUTOEXTEND ON NEXT 256M MAXSIZE UNLIMITED
 SEGMENT SPACE MANAGEMENT AUTO;
. . .
EXECUTE SEM_APIS.CREATE_SEM_NETWORK('rdf_tblspace', options=>'MODEL_PARTITIONING=BY_HASH_P MODEL_PARTITIONS=16');