Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

..
Failed to load latest commit information.
README
earl-db2triples-mysql-dm.ttl
earl-db2triples-mysql-r2rml.ttl
earl-db2triples-postgresql-dm.ttl
earl-db2triples-postgresql-r2rml.ttl
mysql.diff
postgresql.diff
ts_mysql.ttl
ts_postgresql.ttl

README

DB2Triples - RDB2RDF Antidot implementation
LGPL Licence
https://github.com/antidot/db2triples
http://www.antidot.net



Introduction
============

This contains the "earl reports" of db2triples on:
- R2RML, W3C Working Draft 29 May 2012 : http://www.w3.org/TR/2012/WD-r2rml-20120529/
- Direct MApping, W3C Working Draft 29 May 2012 : http://www.w3.org/TR/2012/WD-rdb-direct-mapping-20120529/

These 2 norms have tested on MySQL 5.1.63 (JDBC connector 5.1.15) and PostgreSQL 9.1 (JDBC connector 9.1-901)

The test protocol used "R2RML and Direct Mapping Test Cases, W3C Editor's Draft 1 July 2012" is available here:
http://www.w3.org/2001/sw/rdb2rdf/test-cases/

The earl reports was generated using the protocol here:
http://www.w3.org/2001/sw/rdb2rdf/wiki/Submitting_Test_Results
with the 0.0.8 version of the Test Harness software.


Results
=======
All PostgreSQL test passed.
All DirectMapping MySQL passed, only the R2RMLTC0002f failed in R2RML with MySQL, due to bad implementation of "regular identifier" and "delimited identifier" in MySQL


Tests modification
=================
Because MySQL and PostgreSQL do not entirely respect SQL:2008, some modifications have been made to the test case.
A "diff file" is provided for each of these drivers in the same directory as this README

PostgreSQL
==========
- Test 14, replace:
rr:inverseExpression "{\"deptno\"} = substr({\"deptId\"},length('Department')+1)"];
by
rr:inverseExpression "{\"deptno\"} = cast(substr({\"deptId\"},length('Department')+1) as int)"];
- Test 16, replace:
"Photo" VARBINARY(200),
by
"Photo" BYTEA,
and adapt begininng of hex data (replace X' by E'\\x


MySQL
=====
To be more closer to the SQL:2008, JDBC connection have been made with the following option:
> characterEncoding=utf8
> sessionVariables=sql_mode='ANSI'
> storage_engine=InnoDB&padCharsWithSpace=true

This makes JDBC MySQL connecting request as:
jdbc:mysql://localhost/testing?characterEncoding=utf8&sessionVariables=sql_mode='ANSI',storage_engine=InnoDB&padCharsWithSpace=true

Then, only the test 14 have been modified:
- Due to MySQL JDBC connector bug, replace the "in place" definition of the foreign key:
"deptno" INTEGER REFERENCES "DEPT" ("deptno"),
by two lignes
"deptno" INTEGER
[...]
FOREIGN KEY("deptno") REFERENCES "DEPT" ("deptno")
- MySQL considers than "String" concatenated with "Integer" gives "Binary". To have "String" as intended, replace:
SELECT ('Department' || "deptno") AS deptId
by
SELECT ('Department' || Cast("deptno" As Char)) AS deptId


Contacts
========

opensource@antidot.net


Something went wrong with that request. Please try again.