15.16 SEM_APIS.ALTER_SPM_TAB

Format

SEM_APIS.ALTER_SPM_TAB (
     spm_type           IN NUMBER,
     spm_name           IN DBMS_ID,
     model_name         IN VARCHAR2,
     command            IN VARCHAR2,
     pred_name          IN VARCHAR2,
     occurrence         IN NUMBER DEFAULT NULL,
     reversed           IN BOOLEAN DEFAULT FALSE,
     degree             IN NUMBER DEFAULT NULL,
     options            IN VARCHAR2 DEFAULT NULL,
     network_owner      IN DBMS_ID 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.ALTER_RESULT_TAB subprogram instead.

Description

Alters the presence or extent of presence of the columns corresponding to a predicate in a given SPM table.

Parameters

spm_type

Type of the SPM table.

The value can be one of the following:
  • SEM_APIS.SPM_TYPE_SVP
  • SEM_APIS.SPM_TYPE_MVP
  • SEM_APIS.SPM_TYPE_PCN
spm_name

String for use as part of the name of the SPM table. If the target is an MVP table, then specify the name of the property.

model_name

Name of the RDF model.

command

Determines the type of alteration.

The supported commands are:

  • ADD_PREDICATE: Adds columns for the target predicate to an SPM table, where the target predicate is found. Applies to SVP tables only and succeeds only if the target predicate is single-valued in the given RDF model.
  • DROP_PREDICATE: Drops columns for the target predicate from the SPM table, where the target predicate is found. Note that this applies to SVP tables only.
  • ADD_VALUE: Adds value columns for the target predicate to an SPM table, where the target predicate is found.
  • DROP_VALUE: Drops value columns for the target predicate from an SPM table, where the target predicate is found.
  • ADD_S_VALUE: Includes lexical values for the subject.
  • DROP_S_VALUE: Drops lexical values for the subject.
pred_name

Name of the target predicate if the SPM table is of type SVP or PCN. Must be NULL for an MVP type table.

occurrence

Applies only to an SPM table of type PCN and when the command is ADD_VALUE or DROP_VALUE.

reversed

Applies only to an SPM table of type SVP and when the command is ADD_PREDICATE.

degree

Degree of parallelism to use.

options

Reserved for future use.

network_owner

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

network_name

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

Usage Notes

Examples

The following example adds in-line lexical value for the <http://www.example.com#lname> property:

BEGIN
  SEM_APIS.ALTER_SPM_TAB(
     spm_type      => SEM_APIS.SPM_TYPE_SVP
   , spm_name      => 'FLHF'
   , model_name    => 'M1'
   , command       => 'ADD_VALUE'
   , pred_name     => '<http://www.example.com#lname>'
   , network_owner => 'RDFUSER'
   , network_name  => 'NET1'
  );
END;
/