SEM_APIS.BUILD_RESULT_TAB

Format

SEM_APIS.BUILD_RESULT_TAB (
    query_pattern_type IN NUMBER,
    result_tab_name    IN VARCHAR2,
    rdf_graph_name     IN VARCHAR2,
    key_string         IN VARCHAR2,
    prefixes           IN VARCHAR2 DEFAULT NULL,
    tablespace_name    IN DBMS_ID DEFAULT NULL,
    degree             IN NUMBER DEFAULT NULL,
    options            IN VARCHAR2 DEFAULT NULL,
    network_owner      IN DBMS_ID DEFAULT NULL,
    network_name       IN VARCHAR2 DEFAULT NULL);

Description

Creates a result table of the specified type for the specified RDF graph.

More information on these parameters are described in the following Parameters section.

Parameters

query_pattern_type

Type of the result table.

The value can be one of the following:

result_tab_name

String for use as part of the name of the result table.

Must be NULL for an MVP table because the name is auto-generated as Id(<property>) for the (single) property specified in the key_string parameter.

rdf_graph_name

Name of the RDF graph.

key_string

Specifies the list of properties to be included. Each of the properties must be single-valued based on the data in the RDF graph. If a property is preceded by a ‘+’ then the table will include the columns for the lexical values. To include a reversed property, use a ‘^’ before the property. Use of +^:fatherOf, for example, includes lexical value information for the reversed property (intuitively equivalent to a :hasFather property with lexical value information).

prefixes

Specifies the prefixes relevant to properties used in the key_string parameter. Syntax is same as PREFIX syntax used in SPARQL queries.

tablespace_name

Name of the target tablespace for the result table.

degree

Degree of parallelism to use during the operation.

options

String specifying any options to use during the operation.

Supported option is:

network_owner

Owner of the RDF network. (See Table: network_owner and network_name Parameters.)

network_name

Name of the RDF network. (See Table: network_owner and network_name Parameters.)

Usage Notes

Examples

The following example creates an SVP table:

BEGIN
  SEM_APIS.BUILD_RESULT_TAB(
     query_pattern_type => SEM_APIS.SPM_TYPE_SVP
   , result_tab_name    => 'FLHF'
   , rdf_graph_name     => 'M1'
   , key_string         => ' :fname :lname :height ^:fatherOf '
   , prefixes           => ' PREFIX : <http://www.example.com#> '
   , network_owner      => 'RDFUSER'
   , network_name       => 'NET1'
  );
END;
/

The following example creates a PCN table:

BEGIN
  SEM_APIS.BUILD_RESULT_TAB(
     result_tab_name    => 'GRANDPA'
   , query_pattern_type => SEM_APIS.SPM_TYPE_PCN
   , rdf_graph_name     => 'M1'
   , key_string         => ' S :fatherOf :fatherOf '
   , prefixes           => ' PREFIX : <http://www.example.com#> '
   , network_owner      => 'RDFUSER'
   , network_name       => 'NET1'
  );
END;
/

The following example creates an MVP table:

BEGIN
  SEM_APIS.BUILD_RESULT_TAB(
     query_pattern_type => SEM_APIS.SPM_TYPE_MVP
   , result_tab_name    => null /* must be NULL (the name is auto-generated based on id(property) */
   , rdf_graph_name     => 'M1'
   , key_string         => ' :motherOf ' /* must have exactly one property */
   , prefixes           => ' PREFIX : <http://www.example.com#> '
   , network_owner      => 'RDFUSER'
   , network_name       => 'NET1'
  );
END;
/