15.24 SEM_APIS.BUILD_SPM_TAB
Format
SEM_APIS.BUILD_SPM_TAB ( spm_type IN NUMBER, spm_name IN DBMS_ID, model_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);
Note:
This subprogram will be deprecated in a future release. It is recommended that you use the SEM_APIS.BUILD_RESULT_TAB subprogram instead.Description
Creates an SPM table of the specified type for the specified RDF model.
More information on these parameters are described in the following Parameters section.
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.
Must be
NULL
for an MVP table because the name is auto-generated asId(<property>)
for the (single) property specified in thekey_string
parameter. - model_name
-
Name of the RDF model.
- 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 model. 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 asPREFIX
syntax used in SPARQL queries. - tablespace_name
-
Name of the target tablespace for the SPM table.
- degree
-
Degree of parallelism to use during the operation.
- options
-
String specifying any options to use during the operation.
Supported option is:
INMEMORY=T
: Builds the in-memory SVP table with all predicates or in-memory MVP table.S_INDEX=F
: Skips creation of the nonunique index on the START_NODE_ID column of MVP and PCN tables.P_INDEXES=F
: Skips creation of the nonunique indexes on the individual property columns of PCN tables.
- network_owner
-
Owner of the RDF network. (See Table 1-2.)
- network_name
-
Name of the RDF network. (See Table 1-2.)
Usage Notes
- This operation has a DDL semantics.
- The invoker must be the owner of the RDF model or the RDF network or both.
Examples
The following example creates an SVP table:
BEGIN SEM_APIS.BUILD_SPM_TAB( spm_type => SEM_APIS.SPM_TYPE_SVP , spm_name => 'FLHF' , model_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_SPM_TAB( spm_name => ‘GRANDPA’ , spm_type => SEM_APIS.SPM_TYPE_PCN , model_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_SPM_TAB( spm_type => SEM_APIS.SPM_TYPE_MVP , spm_name => null /* must be NULL (the name is auto-generated based on id(property) */ , model_name => 'M1' , key_string => ' :motherOf ' /* must have exactly one property */ , prefixes => ' PREFIX : <http://www.example.com#> ' , network_owner => 'RDFUSER' , network_name => 'NET1' ); END; /
Parent topic: SEM_APIS Package Subprograms