DB2 Version 10.1 for Linux, UNIX, and Windows

Creating a default RDF store

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:
  • Ensure the database has a minimum page size of 32 KB.
  • Ensure the LOGFILSIZ database configuration parameter is set to is greater than or equal to 20000.
    db2 UPDATE DATABASE CONFIGURATION FOR <DB_NAME> 
    USING LOGFILSIZ 20000
  • Ensure that the SYSTOOLSPACE table space exists.
    CREATE TABLESPACE SYSTOOLSPACE IN IBMCATGROUP 
    MANAGED BY AUTOMATIC STORAGE EXTENTSIZE 4
  • Ensure that the authorization ID has the following privileges:
    • CREATETAB authority for the selected database schema.
    • CREATE EXTERNAL ROUTINES authority.
    • Update privileges for table SYSTOOLS.ADMINTASKSTATUS.
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:

  1. 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.
  2. 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