15.115 SEM_APIS.GRANT_RDF_GRAPH_ACCESS_PRIV
Format
SEM_APIS.GRANT_RDF_GRAPH_ACCESS_PRIV( rdf_graph_name IN VARCHAR2, user_name IN VARCHAR2, privilege IN VARCHAR2, user_view IN VARCHAR2 DEFAULT NULL, options IN VARCHAR2 DEFAULT NULL, network_owner IN VARCHAR2 DEFAULT NULL, network_name IN VARCHAR2 DEFAULT NULL);
Description
Grants access privilege on an RDF graph or inferred graph.
Parameters
- rdf_graph_name
-
Name of the RDF graph.
- user_name
-
Database user that is recipient of this privilege.
- privilege
-
Specifies the type of privilege that is granted. Currently allowed values include the following:
QUERY
: Query the RDF graph using SPARQLSELECT
,READ
: Retrieve the RDF graph content using SQL. The source for the content is theRDFT_<rdf_graph>
view in the network owner's schema or the view name, if any, specified for theuser_view
parameter.INSERT
,UPDATE
,DELETE
: Perform SPARQL Update (DML) operations on the RDF graph or SQL DML operations. For SQL DML, the target object is theRDFT_<rdf_graph_name>
view in the network owner's schema.
Note:
QUERY
is the only valid choice if the RDF graph is not a regular RDF graph (that is, not created usingsem_apis.create_rdf_graph
). - user_view
-
Applicable to schema-private network only. If a view was created on the
RDFT_<rdf_graph_name>
view at RDF graph creation time usingsem_apis.create_rdf_graph
or later, privilege is granted on that view. - options
-
If user specifies the word
ENTAILMENT
as part of the string value, then the specifiedrdf_graph_name
is taken as the name of an inferred graph (rules index). (Additional words or phrases may be allowed in future.) - network_owner
-
Owner of the RDF network. (See Table 1-2.)
- network_name
-
Name of the RDF network. (See Table 1-2.)
Usage Notes
The recipient must already have query-only or full access to the RDF network (which guarantees access to dictionary tables, but not individual RDF graphs). This operation grants access to the specified RDF graph.
Examples
The following example grants privilege to database user USER1
to
use SPARQL query against a semantic technology RDF graph named
articles
in the schema-private network
NET1
owned by database user RDFUSER
.
(This example refers to the RDF graph described in Example 1-129.)
EXECUTE SEM_APIS.GRANT_RDF_GRAPH_ACCESS_PRIV('articles', 'USER1', 'QUERY', network_owner=>'RDFUSER', network_name=>'NET1');
Parent topic: SEM_APIS Package Subprograms