Fachbereich Wirtschaftswissenschaft - Freie Universität Berlin
Chris Bizer - Institut für Produktion, Wirtschaftsinformatik und OR

   
D2P - Database-to-Piggy-Bank Bridge

The D2P Database-to-Piggy-Bank Bridge is an extension to the Piggy Bank Semantic Web browser which makes information stored in relational databases accessible to Piggy Bank using D2RQ mappings. The bridge allows you to browse the content of non-RDF databases using Piggy Bank and to collect data from relational databases into your local Piggy Bank RDF store.

D2RQ

D2RQ closes the gap between relational non-RDF databases and the Semantic Web. D2RQ is a declarative language to describe mappings between relational database schemas and OWL/RDFS ontologies. The mappings allow RDF applications to access the content of huge, non-RDF databases using Semantic Web query languages like RDQL.

Piggy Bank

The Piggy Bank extension for the Firefox browser developed by the SIMILE project extends Firefox to a Semantic Web Browser. Web contents can be browsed, searched and collected into a local RDF repository. Information not available as RDF, but as HTML or XML, can be converted into RDF using a scraping mechanism.

What can D2P do for you?

D2P allows you to browse the content of non-RDF databases using Piggy Bank and to collect data from relational databases into your local Piggy Bank RDF store. The D2P database-to-piggybank bridge integrates D2RQ as a new type of information scraper into Piggy Bank. The D2P bridge can connect to all database accessible via D2RQ. D2RQ supports ODBC and JDBC connections. D2P doesn't dump the whole relational database into RDF, but extracts the content required by Piggy Bank on the fly.

Usage Example

The way how to define and activate a D2P scraper is nearly the same as for Javascript and XSLT screen scrapers.

Before we start to define the scraper, we need a relational database and a D2RQ mapping to an RDFS schema for this database. Here we use the example from the D2RQ homepage. Please download the ISWC example database and the ISWC D2RQ mapping file on your local machine. The database i s available as MySQL dump and as MS Access Database. Note, that the mapping file have to be configured to whether you are using MySQL or MS Access. To define your own mappings please read the D2RQ documentation.

We open an new N3 coded RDF file and type the URI of our Scraper as d2p:D2RQScraper (d2p stands for http://www.wiwiss.fu-berlin.de/suhl/bizer/d2rq/d2p#).

d2p:D2RQScraper

Class of all D2P scrapers.

To configure the scraper three properties have to be added to the scraper. Each scraper should have a rdf:label to give it a clear readable name. The d2p:d2rqMapUrl property contains the URL, where the D2P Scraper can load the mapping with the database connection configuration. The pd:urlPattern identifies the URL to activate the D2P Scraper. To avoid confusions we suggest to use the URL of the D2RQ mapping file as URL pattern.

d2p:d2rqMapUrl

The URL of the file, which configures the database connection and defines the mapping between the database and RDF.

pb:urlPattern

If the URL in the Firefox Browser fits this URL pattern then the D2P Scraper will be activated.

The box below contains the complete D2P Scraper.

@prefix rdf:        <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:       <http://www.w3.org/2000/01/rdf-schema#> .
@prefix pb:         <http://simile.mit.edu/2005/04/piggy-bank#> .
@prefix d2rq:       <http://www.wiwiss.fu-berlin.de/suhl/bizer/d2rq#> .
@prefix d2p:        <http://www.wiwiss.fu-berlin.de/suhl/bizer/d2rq/d2p#> .


d2rq:D2PScraper
  rdf:type          d2p:D2PScraper ;
  rdfs:label        "D2P Scraper of the D2P Database-to-Piggy-Bank Bridge example"@en ;
  pb:urlPattern     "^http://www\\.wiwiss\\.fu-berlin\\.de/suhl/bizer/d2rq/d2p/ISWC-d2rq\\.n3" ;
  d2p:d2rqMapURL     "http://www.wiwiss.fu-berlin.de/suhl/bizer/d2rq/d2p/ISWC-d2rq.n3"
.           

As second step, the scraper has to be loaded and activated. Open the file containing the D2P scrapper using the Firefox "File open..." dialog. Browse to the Tidbits of the scraper by clicking the Tidbits button in the bottom left corner of the browser window. Piggy Bank will show you the scraper data in its temporary repository. Press "Save" to store the D2O Scraper in your personal Piggy Bank repository. Piggy Bank shows the stroked gears deactive scraper to indicate that the stored resource is a deactivated scraper. Click the gears to activate the scraper. Piggy Bank shows the unstroked gears .

When loading a URL that fits to the URL pattern, the scraper will be started.
Browse to: http://www.wiwiss.fu-berlin.de/suhl/bizer/d2rq/d2p/ISWC-d2rq.n3

Which will display the mapping file. When you click on the Tidbits the Tidbits button in the bottom left corner of the browser window symbol, the scraper connects to the database and display its content. Piggy Bank will present 29 items contained in the ISWC database.

 

Download

In order to run the D2P bridge, you have to install the d2p_bridge.xpi extension into your Firefox browser. The XPI inlcudes a complete Piggy Bank 2.1. Please do not load this extension together with an other Piggy Bank installation in the same firefox profile.

The code and project data are availavle as ZIP file d2p_bridge_src.zip.

 

Feedback

Please sent comments and bug reports about D2P to the D2RQ mailing list:

d2rq-map-devel@lists.sourceforge.net

The archives of the list are found at: http://sourceforge.net/mailarchive/forum.php?forum=d2rq-map-devel
You can subscribe to the list at: http://lists.sourceforge.net/lists/listinfo/d2rq-map-devel

 

Oliver Maresch oliver-maresch@gmx.de

Chris Bizer chis@bizer.de , http://www.bizer.de/

 

 

Freie Universit� Berlin - Fachbereich Wirtschaftswissenschaft - Institut fr Produktion, Wirtschaftsinformatik und Operations Research
Lehrstuhl für Wirtschaftsinformatik: Prof. Dr. Uwe H. Suhl
Letzte Aktualisierung: 25.10.2005
Administrator