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 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.
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.
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.
Writing a D2P Scraper
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#).
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.
The box below contains the complete D2P Scraper.
Activating the Scrapper
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 . 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 to indicate that the stored resource is a deactivated scraper. Click the gears to activate the scraper. Piggy Bank shows the unstroked gears .
Invoking the Scrapper
When loading a URL that fits to the URL pattern, the scraper will be started.
Which will display the mapping file. When you click on the Tidbits symbol, the scraper connects to the database and display its content. Piggy Bank will present 29 items contained in the ISWC database.
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.
Please sent comments and bug reports about D2P to the D2RQ mailing list:
The archives of the list are found at:
Oliver Maresch firstname.lastname@example.org
Freie Universit� Berlin - Fachbereich
Wirtschaftswissenschaft - Institut fr Produktion, Wirtschaftsinformatik und
Lehrstuhl für Wirtschaftsinformatik: Prof. Dr. Uwe H. Suhl
Letzte Aktualisierung: 25.10.2005