You can create a RDF store without any existing RDF data.
This is also known as a default RDF store.
Before you begin
The following prerequisites are required:
In addition, also set up the following functionality:
- Set the Administrative Task Scheduler to "YES".
db2set DB2_ATS_ENABLE=YES
- Set the AUTORUNSTATS database configuration
parameter to "ON".
db2 UPDATE DB CONFIG USING AUTO_MAINT ON AUTO_TBL_MAINT ON AUTO_RUNSTATS ON
- Set the bufferpool to "AUTOMATIC", and assign a good initial size.
db2 alter bufferpool IBMDEFAULTBP IMMEDIATE SIZE 15000 AUTOMATIC
Procedure
Use the following instructions to create a default RDF
store:
- Control the names of database tables and table spaces that
will make up the RDF store. Create an objectNames.props properties
file, containing a list of RDF store data tables and the corresponding
names and table spaces your want to assign to the tables.
The
contents of a sample
objectNames.props properties
file are shown in the following example:
direct_primary_hash=<user_table_name>, <tablespace>
direct_secondary=<user_table_name>, <tablespace>
reverse_primary_hash=<user_table_name>, <tablespace>
reverse_secondary=<user_table_name>, <tablespace>
long_strings=<user_table_name>, <tablespace>
basic_stats=<user_table_name>, <tablespace>
topk_stats=<user_table_name>, <tablespace>
system_predicate=<user_table_name>, <tablespace>
data_type=<user_table_name>, <tablespace>
Note: Using the objectNames.props file
to set table names is optional. However, if you choose not to use
this properties file, then system generated names will be used instead.
- Issue the createrdfstore command. Determine the database instance and schema in which you want
to create the RDF store. Also, decide on a logical name for the store.
This name needs to be unique among all RDF stores within the database
schema.
For example, use the following command to create a store
named
rdfStore1 in database
DB1 and
schema
db2admin for host
localhost and
port 60000:
createrdfstore rdfStore1 -host localhost -port 60000 -db DB1
-user db2admin -password XXX -schema db2admin