15.44 SEM_APIS.CREATE_SEM_MODEL
Format
SEM_APIS.CREATE_SEM_MODEL( model_name IN VARCHAR2, table_name IN VARCHAR2, column_name IN VARCHAR2, model_tablespace IN VARCHAR2 DEFAULT NULL, options IN VARCHAR2 DEFAULT NULL, network_owner IN VARCHAR2 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.CREATE_RDF_GRAPH subprogram instead.Description
Creates a semantic technology model.
Parameters
- model_name
-
Name of the model.
- table_name
-
Name of the table to hold references to semantic technology data for this model.
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. - model_tablespace
-
Name of the tablespace for the tables and other database objects used by Oracle to support this model. The default value is the tablespace that was specified in the call to the SEM_APIS.CREATE_SEM_NETWORK procedure.
- options
-
An optional quoted string with one or more of the following model creation options:
-
COMPRESS=CSCQH
uses COLUMN STORE COMPRESS FOR QUERY HIGH on the RDF_LINK$ partition for the model. -
COMPRESS=CSCQL
uses COLUMN STORE COMPRESS FOR QUERY LOW on the RDF_LINK$ partition for the model. -
COMPRESS=RSCA
uses ROW STORE COMPRESS ADVANCED on the RDF_LINK$ partition for the model. -
COMPRESS=RSCB
uses ROW STORE COMPRESS BASIC on the RDF_LINK$ partition for the model. -
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 model.
-
- network_owner
-
Owner of the semantic network. (See Table 1-2.)
- network_name
-
Name of the semantic network. (See Table 1-2.)
Usage Notes
This procedure adds the model to the SEM_MODEL$ view, which is described in Metadata for Models.
This procedure is the only supported way to create a model. Do not use SQL INSERT statements with the SEM_MODEL$ view.
To delete a model, use the SEM_APIS.DROP_SEM_MODEL procedure.
The options COMPRESS=CSCQH
, COMPRESS=CSCQL
,
and COMPRESS=RSCA
should be used only if you have the appropriate
licenses.
For information about semantic network types and options, see RDF Networks.
Examples
The following example creates a semantic technology model 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_SEM_MODEL('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 model:
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'));
Parent topic: SEM_APIS Package Subprograms