15.12 SEM_APIS.ALTER_RESULT_TAB

Format

SEM_APIS.ALTER_RESULT_TAB (
     query_pattern_type IN NUMBER,
     result_tab_name    IN VARCHAR2,
     rdf_graph_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);

Description

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

Parameters

query_pattern_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
result_tab_name

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

rdf_graph_name

Name of the RDF graph.

command

Determines the type of alteration.

The supported commands are:

  • ADD_PREDICATE: Adds columns for the target predicate to a result 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 graph.
  • DROP_PREDICATE: Drops columns for the target predicate from the result 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 a result table, where the target predicate is found.
  • DROP_VALUE: Drops value columns for the target predicate from a result 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 result table is of type SVP or PCN. Must be NULL for an MVP type table.

occurrence

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

reversed

Applies only to a result 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_RESULT_TAB(
     query_pattern_type => SEM_APIS.SPM_TYPE_SVP
   , result_tab_name    => 'FLHF'
   , rdf_graph_name     => 'M1'
   , command            => 'ADD_VALUE'
   , pred_name          => '<http://www.example.com#lname>'
   , network_owner      => 'RDFUSER'
   , network_name       => 'NET1'
  );
END;
/