Creating an MDSYS-owned Semantic Network

You can create an MDSYS-owned semantic network using a SQL based interface such as SQL Developer, SQLPLUS, or from a Java program using JDBC.

  1. Connect to Oracle Database as a SYSTEM user with a DBA privilege.

    CONNECT system/<password-for-system-user>
  2. Create a tablespace for storing the RDF graphs. Use a suitable operating system folder and filename.

    CREATE TABLESPACE rdftbs
      DATAFILE 'rdftbs.dat'
      SIZE 128M REUSE
      AUTOEXTEND ON NEXT 64M
      MAXSIZE UNLIMITED
      SEGMENT SPACE MANAGEMENT AUTO;
  3. Grant quota on rdftbs to MDSYS.

    ALTER USER MDSYS QUOTA UNLIMITED ON rdftbs;
  4. Create a tablespace for storing the user data. Use a suitable operating system folder and filename.

    CREATE TABLESPACE usertbs
      DATAFILE 'usertbs.dat'
      SIZE 128M REUSE
      AUTOEXTEND ON NEXT 64M
      MAXSIZE UNLIMITED
      SEGMENT SPACE MANAGEMENT AUTO;
  5. Create a database user to create or use RDF graphs or do both using the adapter.

    CREATE USER rdfuser
    IDENTIFIED BY <password-for-rdfuser>
    DEFAULT TABLESPACE usertbs
    QUOTA 5G ON usertbs;
  6. Grant quota on rdftbs to RDFUSER.

    ALTER USER RDFUSER QUOTA 5G ON rdftbs;
  7. Grant the necessary privileges to the new database user.

    GRANT CONNECT, RESOURCE TO rdfuser;
  8. Create an MDSYS-owned semantic network.

    EXECUTE SEM_APIS.CREATE_SEM_NETWORK(tablespace_name =>'rdftbs');
  9. Verify that MDSYS-owned semantic network has been created successfully.

    SELECT table_name
      FROM sys.all_tables
      WHERE table_name = 'RDF_VALUE$' AND owner='MDSYS';

    Presence of RDF_VALUE$ table in the MDSYS schema shows that the MDSYS-owned semantic network has been created successfully.

    TABLE_NAME
    
    -----------
    RDF_VALUE$