IBM DB2 & Derby Jena Drivers   

Download

Drivers for Jena 2.1 and 2.2

Overview

The Jena Semantic Web Framework provides persistant storage of RDF to relational databases. This project is a set drivers that extend Jena's persistant storage to support the following databases:

These drivers are licensed under the BSD License.

The original author of the DB2 Driver driver is Alyssa Wolf. The author of Apache Derby and IBM Cloudscape drivers is Joe Betz ( jpbetz@gmail.com ), the maintainer of this project and the drivers.

 

Requirements

Usage

Below are examples of creating Jena DB connections using these drivers. See Jena's Database Interface Howto for details about creating Jena persistant models.

Important: These drivers contain some minor modifications to Jena source required for proper functionality of the databases. For these modifications to be active, the JAR file containing these drivers must be loaded by the Java classloader BEFORE Jena is. These modifications have been submitted to Jena and we anticipate that later versions will not require modifications to Jena's source.

  • IBM DB2 Example configuration:
    • Required JDBC Jar: db2java.zip (included with IBM DB2 install)
    • Java configuration:
      String M_DB_URL = "jdbc:db2:DB2TestDB";
      String M_DB_USER = "user";
      String M_DB_PASSWD = "password";
      String M_DB = "DB2";  // database engine
      String M_DBDRIVER_CLASS = "COM.ibm.db2.jdbc.app.DB2Driver";
      Class.forName(TM_DBDRIVER_CLASS);
      IDBConnection db2Connection = new DBConnection (M_DB_URL, M_DB_USER, M_DB_PASSWD, M_DB);
      		
  • IBM Cloudscape Example configuration:
    • Required JDBC Jar: db2j.jar (included with IBM Cloudscape install)
    • Java configuration:
      String M_DB_URL = "jdbc:db2j:c:/cloudscapeDriverTestDB;create=true";
      String M_DB_USER = "user";
      String M_DB_PASSWD = "password";
      String M_DB = "DB2J";
      String M_DBDRIVER_CLASS = "com.ibm.db2j.jdbc.DB2jDriver";
      Class.forName(TM_DBDRIVER_CLASS);
      IDBConnection cloudscapeConnection = new DBConnection (M_DB_URL, M_DB_USER, M_DB_PASSWD, M_DB);
      		
  • Apache Derby Example configuration:
    • Required JDBC Jar: derby.jar (included with Apache Derby install)
    • Java configuration:
      String M_DB_URL = "jdbc:derby:c:/DerbyDriverTestDB;create=true";
      String M_DB_USER = "user";
      String M_DB_PASSWD = "password";
      String M_DB = "Derby";
      String M_DBDRIVER_CLASS = "org.apache.derby.jdbc.EmbeddedDriver";
      Class.forName(TM_DBDRIVER_CLASS);
      IDBConnection derbyConnection = new DBConnection (M_DB_URL, M_DB_USER, M_DB_PASSWD, M_DB);
      		

Download

Releases:

For all downloads available see the Sourceforge Files Page: Files Page

While CVS for this project is periodically updated to work with the latest in CVS from Jena we recommend developers constrain themselves to our releases and the corresponding Jena releases. For anonymous cvs access see the SourceForge CVS page: CVS Page.

 
Design by Plain Black. Used with permission from the WebGUI open source content management project.