7.3 Setting Up the RDF Graph Environment

To use the support for Apache Jena to perform queries, you can connect as any user (with suitable privileges) and use any RDF graphs in the RDF network.

If your RDF Graph environment already meets the requirements, you can go directly to compiling and running Java code that uses the support for Apache Jena. If your RDF Graph environment is not yet set up to be able to use the support for Apache Jena, you can perform actions similar to the following example steps:

  1. Connect as SYSTEM:
    sqlplus system/<password-for-system>
    
  2. Create a tablespace for the system tables. For example:
    CREATE TABLESPACE rdf_users datafile 'rdf_users01.dbf' 
        size 128M reuse autoextend on next 64M 
        maxsize unlimited segment space management auto;
    
  3. Create a database user (for connecting to the database to use the RDF network and the support for Apache Jena). For example:
    CREATE USER rdfusr IDENTIFIED BY <password-for-udfusr>
                       DEFAULT TABLESPACE rdf_users;
    
  4. Grant the necessary privileges to this database user. For example:
    GRANT connect, resource TO rdfusr;
    
  5. Create the RDF network. For example:
    EXECUTE sem_apis.create_RDF_network('RDF_USERS', network_owner=>'RDFUSR', network_name=>'LOCALNET');
    
  6. To use the support for Apache Jena with your own RDF data, perform the appropriate steps to store data, create an RDF graph, and create database indexes, as explained in Quick Start for Using RDF Data. Then perform queries by compiling and running Java code; see Example Queries Using RDF Graph Support for Apache Jena for information about example queries.

    To use the support for Apache Jena with supplied example data, see Example Queries Using RDF Graph Support for Apache Jena.