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.
-
Connect to Oracle Database as a
SYSTEMuser with a DBA privilege.CONNECT system/<password-for-system-user> -
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; -
Grant quota on
rdftbsto MDSYS.ALTER USER MDSYS QUOTA UNLIMITED ON rdftbs; -
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; -
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; -
Grant quota on
rdftbsto RDFUSER.ALTER USER RDFUSER QUOTA 5G ON rdftbs; -
Grant the necessary privileges to the new database user.
GRANT CONNECT, RESOURCE TO rdfuser; -
Create an MDSYS-owned semantic network.
EXECUTE SEM_APIS.CREATE_SEM_NETWORK(tablespace_name =>'rdftbs'); -
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$