15.123 SEM_APIS.MERGE_RDF_GRAPHS

Format

SEM_APIS.MERGE_RDF_GRAPHS(
     source_rdf_graph      IN VARCHAR2, 
     destination_rdf_graph IN VARCHAR2, 
     rebuild_apptab_index  IN BOOLEAN DEFAULT TRUE, 
     drop_source_rdf_graph IN BOOLEAN DEFAULT FALSE, 
     options               IN VARCHAR2 DEFAULT NULL,
     network_owner         IN VARCHAR2 DEFAULT NULL,
     network_name          IN VARCHAR2 DEFAULT NULL);

Description

Inserts the content from a source RDF graph into a destination RDF graph, and updates the destination application table.

Parameters

source_rdf_graph

Name of the source RDF graph.

destination_model

Name of the destination RDF graph.

rebuild_apptab_index

TRUE causes indexes on the destination application table to be rebuilt after the graphs are merged; FALSE does not rebuild any indexes.

drop_source_rdf_graph

TRUE causes the source RDF graph (source_rdf_graph) to be deleted after the graphs are merged; FALSE (the default) does not delete the source graph.

options

A comma-delimited string of options that overrides the default behavior of the procedure. Currently, only the DOP (degree of parallelism) option is supported, to enable parallel execution of this procedure and to specify the degree of parallelism to be associated with the operation.

network_owner

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

network_name

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

Usage Notes

Before you merge any RDF graphs, if you are using positional parameters, check to be sure that you are specifying the correct graphs for the first and second parameters (source RDF graph for the first, destination RDF graph for the second). This is especially important if you plan to specify drop_source_rdf_graph=TRUE.

If appropriate, make copies of the destination graph or both the graphs before performing the merge. To make a copy of an RDF graph, use SEM_APIS.CREATE_RDF_GRAPH to create an empty graph with the desired name for the copy, and use SEM_APIS.MERGE_RDF_GRAPHS to populate the newly created copy as the destination graph.

Some common uses for this procedure include the following:

  • If you have read-only access to an RDF graph that you want to modify, you can clone that graph into an empty graph on which you have full access, and then modify this latter graph.

  • If you want to consolidate multiple RDF graphs, you can use this procedure as often as necessary to merge the necessary graphs. Merging all graphs beforehand and using only the merged graph simplifies entailment and can improve entailment performance.

On a multi-core or multi-cpu machine, the DOP (degree of parallelism) option can be beneficial. See Examples for an example that uses the DOP option.

If the source graph is large, you may want to update the optimizer statistics on the destination after the merge operation by calling the SEM_APIS.ANALYZE_RDF_GRAPH procedure.

The following considerations apply to the use of this procedure:

  • You must be the owner of the destination graph and have SELECT privilege on the source graph. If drop_second_model=TRUE, you must also be owner of the source graph.

  • This procedure is not supported on RDF graph collections (explained in RDF Graph Collections).

  • No table constraints are allowed on the destination application table.

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

Examples

The following example inserts the contents of graphl M1 into M2.

EXECUTE SEM_APIS.MERGE_RDF_GRAPHS('M1', 'M2');

The following example inserts the contents of graph M1 into M2, and it specifies a degree of parallelism of 4 (up to four parallel threads for execution of the merge operation).

EXECUTE SEM_APIS.MERGE_RDF_GRAPHS('M1', 'M2', null, null, 'DOP=4');