Using IBM DB2 NoSQL Graph Store in Websphere Application Server Community Edition

This is the first of a series of blog posts about our experience with the IBM DB2 Express-C NoSQL Graph Store (hereafter DB2 RDF) in combination with IBM WebSphere Application Server Community Edition (hereafter WASCE).

The DB2 RDF product allows the storage and manipulation of RDF data. The data can be stored in graphs, all according to W3C Recommendations. The DB2 RDF product uses the Apache Jena programming model to interact with the underlying store. In the very detailed documentation there is an outline of products and tools needed to get the basic DB2 RDF programming environment going.

This series of articles is specifically about using the tools inside the WASCE environment. While developing our RESC.Info product we gathered a lot of experience which we like to share with the community using this article. We will also be presenting our experience during this years IBM Information On Demand 2013 in Las Vegas.

The series will cover the following topics:

  • Configuring WASCE data sources
  • Assembling the correct Jena distribution
  • Dealing with transactions

This first article is about configuring WASCE data sources for use with the DB2 RDF and Jena programming model. This is NOT meant to be an extensive installation guide for these products, you should refer to the respective product documentation for more information on installation.
It is very important to select the correct versions of the various products:

  • IBM DB2 Express-C 10.1.2
  • IBM WebSphere Application Server Community Edition 3.0.4

Creating a DB2 database and graph store

To  be able to use the DB2 RDF features we need to create a standard database with some specific parameters. The DB2 documentation contains extensive information for this task. To create a database ‘STORE’ that supports DB2 RDF we issue the following commands:

db2 CREATE DATABASE STORE PAGESIZE 32 K
db2 UPDATE DATABASE CONFIGURATION FOR STORE USING LOGFILSIZ 20000
db2 CREATE TABLESPACE SYSTOOLSPACE IN IBMCATGROUP MANAGED BY AUTOMATIC STORAGE EXTENTSIZE 4

For the correct administration we also need to execute:

db2set DB2_ATS_ENABLE=YES
db2 UPDATE DB CONFIG USING AUTO_MAINT ON AUTO_TBL_MAINT ON AUTO_RUNSTATS ON
db2 alter bufferpool IBMDEFAULTBP IMMEDIATE SIZE 15000 AUTOMATIC

Now that the database is created we still need to create a graph store inside the database. This is done with the following command:

createrdfstore rdfStore  -db STORE -user db2admin -password XXX -schema public 

This can take a while. After completion you will have a graph store ‘rdfStore’ inside your database ‘STORE’. To check the presence of this store issue the following command when connected to ‘STORE’:

db2 SELECT * FROM SYSTOOLS.RDFSTORES

The resulting table should contain reference to our store ‘rdfStore’ in schema ‘public’

WebSphere Application Server Community Edition installation

Install WASCE with the installer, but do not start it yet. WASCE is distributed with some older DB2 JDBC drivers which interfere with the DB2 JDBC4 drivers that are needed for the DB2 RDF interface. In the repository directory of WASCE look for the path

<wasce_install>/repository/com/ibm

and delete the db2 sub-directory. Run WASCE with the -clean parameter, which causes WASCE to cleanup all references to the included DB2 JDBC drivers.

geronimo.[sh/bat] run -clean

Installing db2jcc4.jar

Now it is time to install the JDBC4 driver into WASCE repository. In the advanced mode of the console you will find the Resources/Repository tab where you can add new jars to the repository. Select the db2jcc4.jar from your <DB2_INST>/java directory and fill out the fields as shown in the image and click ‘Install’.
wascerepos

Creating a Database Pool

Once the correct jar is installed the creation of the connection to the database is the same as any other regular database connection. Select DB2 XA as ‘Database type’ and fill out the connection information. You should only see one JDBC driver here, the one we just installed. Fill out the details of your regular DB2 database ‘STORE’ and click ‘Deploy’.

After a database source object is created we can use it in the simple SQL entry field, select the newly created data source and issue the following command:

SELECT * FROM SYSTOOLS.RDFSTORES

The result should be the same as the result we had after issuing this query from the command line.

Conclusion

Now we have setup a DB2 RDF connection inside WASCE with the correct version of both products and connecting drivers. The next step will be to create a simple Jena based application to interact with the store.

79 thoughts on “Using IBM DB2 NoSQL Graph Store in Websphere Application Server Community Edition

  1. Accelerate Your Growth – 30 Days at No Cost

    Hi,

    My name is Irma and I am the founder at BIGLEP. We work with organizations like Getresponse to accelerate small businesses growth through offering email marketing tools.

    Powerfully-simple features let you concentrate on your business — not marketing technology:
    drag and drop email creation, pre-built templates, automations, powerful analytics.

    Interested? Get 15mins on your calendar to explore: https://www.biglep.com/growth

    Cheers,
    Irma

    To unsubscribe: reply “no”

  2. Good post. I study something tougher on different blogs everyday. It’s going to at all times be stimulating to read content from other writers and follow a bit of something from their store. I抎 want to use some with the content on my weblog whether you don抰 mind. Natually I抣l offer you a link on your internet blog. Thanks for sharing.

  3. After research a few of the blog posts on your website now, and I actually like your way of blogging. I bookmarked it to my bookmark web site checklist and might be checking back soon. Pls try my web page as nicely and let me know what you think.

  4. I’m not sure why but this web site is loading incredibly slow for me. Is anyone else having this problem or is it a issue on my end? I’ll check back later and see if the problem still exists.

  5. I was wondering if you ever thought of changing the page layout of your website? Its very well written; I love what youve got to say. But maybe you could a little more in the way of content so people could connect with it better. Youve got an awful lot of text for only having 1 or two images. Maybe you could space it out better?

  6. Hey! I could have sworn I’ve been to this site before but after checking through some of the post I realized it’s new to me. Anyways, I’m definitely delighted I found it and I’ll be bookmarking and checking back often!

  7. I was curious if you ever thought of changing the page layout of your website? Its very well written; I love what youve got to say. But maybe you could a little more in the way of content so people could connect with it better. Youve got an awful lot of text for only having 1 or two pictures. Maybe you could space it out better?

  8. Thanks for sharing your ideas. I might also like to state that video games have been ever before evolving. Modern tools and innovative developments have aided create genuine and interactive games. These kind of entertainment video games were not as sensible when the real concept was first of all being tried out. Just like other styles of technological know-how, video games as well have had to grow by many years. This is testimony on the fast continuing development of video games.

  9. I was suggested this blog by my cousin. I’m not sure whether this post is written by him as no one else know such detailed about my trouble. You are wonderful! Thanks!

  10. Hmm is anyone else experiencing problems with the images on this blog loading? I’m trying to determine if its a problem on my end or if it’s the blog. Any feed-back would be greatly appreciated.

  11. Hiya, I am really glad I’ve found this info. Today bloggers publish only about gossips and net and this is actually frustrating. A good site with exciting content, that’s what I need. Thanks for keeping this site, I’ll be visiting it. Do you do newsletters? Can’t find it.

  12. There are some fascinating deadlines on this article but I don’t know if I see all of them center to heart. There may be some validity but I’ll take hold opinion until I look into it further. Good article , thanks and we want extra! Added to FeedBurner as properly

  13. I seriously love your website.. Pleasant colors & theme. Did you build this amazing site yourself?

    Please reply back as I’m planning to create my own blog and would like to find out where
    you got this from or just what the theme is called. Cheers!

  14. Thanx for the effort, keep up the good work Great work, I am going to start a small Blog Engine course work using your site I hope you enjoy blogging with the popular BlogEngine.net.Thethoughts you express are really awesome. Hope you will right some more posts.

  15. Aw, this was a really nice post. In idea I wish to put in writing like this additionally – taking time and actual effort to make a very good article… but what can I say… I procrastinate alot and under no circumstances appear to get one thing done.

  16. Thanks for ones marvelous posting! I genuinely enjoyed reading it, you are a great
    author. I will be sure to bookmark your blog and will often come back in the
    foreseeable future. I want to encourage you to definitely continue your great posts, have a nice morning!

  17. great submit, very informative. I ponder why the opposite experts of this sector don’t realize this. You must continue your writing. I am sure, you’ve a huge readers’ base already!

  18. Thanks a lot for sharing this with all of us you really know what you’re speaking approximately! Bookmarked. Please additionally talk over with my web site =). We could have a link trade agreement among us!

Leave a Reply

Your email address will not be published. Required fields are marked *