15.38 SEM_APIS.CREATE_RDF_GRAPH

Format

SEM_APIS.CREATE_RDF_GRAPH(
     rdf_graph_name   IN VARCHAR2, 
     table_name       IN VARCHAR2, 
     column_name      IN VARCHAR2, 
     tablespace_name  IN VARCHAR2 DEFAULT NULL,
     options          IN VARCHAR2 DEFAULT NULL,
     network_owner    IN VARCHAR2 DEFAULT NULL,
     network_name     IN VARCHAR2 DEFAULT NULL);

Description

Creates an RDF graph.

Parameters

rdf_graph_name

Name of the RDF graph.

table_name

Name of the table to hold references to semantic technology data for this graph.

This parameter must be NULL for a schema-private network.

column_name

Name of the column of type SDO_RDF_TRIPLE_S in table_name.

This parameter must be NULL for a schema-private network.

tablespace_name

Name of the tablespace for the tables and other database objects used by Oracle to support this graph. The default value is the tablespace that was specified in the call to the SEM_APIS.CREATE_RDF_NETWORK procedure.

options

An optional quoted string with one or more of the following graph creation options:

  • COMPRESS=CSCQH uses COLUMN STORE COMPRESS FOR QUERY HIGH on the RDF_LINK$ partition for the graph.

  • COMPRESS=CSCQL uses COLUMN STORE COMPRESS FOR QUERY LOW on the RDF_LINK$ partition for the graph.

  • COMPRESS=RSCA uses ROW STORE COMPRESS ADVANCED on the RDF_LINK$ partition for the graph.

  • COMPRESS=RSCB uses ROW STORE COMPRESS BASIC on the RDF_LINK$ partition for the graph.

  • MODEL_PARTITIONS=n overrides the default number of subpartitions in a composite partitioned semantic network and creates the specified number (n) of subpartitions in the RDF_LINK$ partition for the graph.

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 procedure adds the RDF graph to the SEM_MODEL$ view, which is described in RDF Graphs.

This procedure is the only supported way to create an RDF graph. Do not use SQL INSERT statements with the SEM_MODEL$ view.

To delete a graph, use the SEM_APIS.DROP_RDF_GRAPH procedure.

The options COMPRESS=CSCQH, COMPRESS=CSCQL, and COMPRESS=RSCA should be used only if you have the appropriate licenses.

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

Examples

The following example creates an RDF graph named articles in the schema-private network. (This example is an excerpt from Example 1-129 in Example: Journal Article Information.)

EXECUTE SEM_APIS.CREATE_RDF_GRAPH('articles', NULL, NULL, network_owner=>'RDFUSER', network_name=>'NET1');

As part of this operation, a new updatable view, RDFUSER.NET1#RDFT_articles, gets created automatically. You can use this view for any SQL DML statements affecting the data. The following example uses the SDO_RDF_TRIPLE_S constructor to insert data into the graph:

INSERT INTO RDFUSER.NET1#RDFT_articles VALUES (
  SDO_RDF_TRIPLE_S ('articles','<http://nature.example.com/Article1>',
    '<http://purl.org/dc/elements/1.1/creator>',
    '"Jane Smith"',
    'RDFUSER',
    'NET1'));