Re: Sparql To SQL
I haven't had a chance to work with it yet but you might want to take a look at http://ontop.inf.unibz.it/ On Mar 30, 2014, at 5:37 AM, Kamalraj Jairam wrote: Hello All, Whats the best way to convert sparql to SQL using R2RML mappings and convert resultset from DB to RDF? Thanks -- Kjairam Sent with Airmail
Sparql To SQL
Hello All, Whats the best way to convert sparql to SQL using R2RML mappings and convert resultset from DB to RDF? Thanks -- Kjairam Sent with Airmail
Re: Sparql To SQL
Hey, have you tried D2RQ? http://d2rq.org Martynas On Sun, Mar 30, 2014 at 11:37 AM, Kamalraj Jairam kjai...@semanticsoftware.com.au wrote: Hello All, Whats the best way to convert sparql to SQL using R2RML mappings and convert resultset from DB to RDF? Thanks -- Kjairam Sent with Airmail
Re: Sparql To SQL
On 30/03/14 12:21, Martynas Jusevičius wrote: Hey, have you tried D2RQ? http://d2rq.org +1 The development version has support for R2RML, I gather. Martynas On Sun, Mar 30, 2014 at 11:37 AM, Kamalraj Jairam kjai...@semanticsoftware.com.au wrote: Hello All, Whats the best way to convert sparql to SQL using R2RML mappings and convert resultset from DB to RDF? R2RML is not a rewrite of SPARQL to SQL. It is an RDF view of the SQL data which can in turn be queried via SPARQL. D2RQ maps basic graph patterns to SQL, the rest of SPARQL is handled in the client query engine. What exactly are you wanting to do? Andy Thanks -- Kjairam Sent with Airmail
Re: Sparql To SQL
My experience with d2rq was that expecting efficient execution was not always likely since sparql and SQL have likely impedance mismatch. (Analogous to object relational mapping difficulties) I found it very useful for schema and type discovery for importing. On Mar 30, 2014 12:53 PM, Andy Seaborne a...@apache.org wrote: On 30/03/14 12:21, Martynas Jusevičius wrote: Hey, have you tried D2RQ? http://d2rq.org +1 The development version has support for R2RML, I gather. Martynas On Sun, Mar 30, 2014 at 11:37 AM, Kamalraj Jairam kjai...@semanticsoftware.com.au wrote: Hello All, Whats the best way to convert sparql to SQL using R2RML mappings and convert resultset from DB to RDF? R2RML is not a rewrite of SPARQL to SQL. It is an RDF view of the SQL data which can in turn be queried via SPARQL. D2RQ maps basic graph patterns to SQL, the rest of SPARQL is handled in the client query engine. What exactly are you wanting to do? Andy Thanks -- Kjairam Sent with Airmail
Re: Sparql To SQL
On Sun, 2014-03-30 at 09:37 +, Kamalraj Jairam wrote: Hello All, Whats the best way to convert sparql to SQL using R2RML mappings and convert resultset from DB to RDF? What are the givens? Do you have existing SPARQL text written against some RDF produced by some existing R2RML mappings? Or do you have some SPARQL and some SQL and you want to fill in the R2RML and produce some RDF? In any case, it is an interesting scenario that will arise more often as companies expand their use of RDF while relying mostly on SQL. There is a higher abstraction that should be explored and possibly exploited to provide a general pattern for working through these situations. Since SQL, SPARQL, and R2RML are rule languages compatible with relational algebra (RA), it should be possible to derive a common set of RA predicates and classes to create an RDF vocabulary. This vocabulary can then be used to write queries as production rules in a generic standard rule language, such as RIF (Rule Interchange Format). The RIF source can be translated to SQL, SPARQL, or R2RML for execution in the target system. Going from RIF to SQL, SPARQL, or R2RML is always going to be easier than starting from SQL or SPARQL and going to some other format. Theoretically you should be able to partially translate R2RML to RIF automatically (SQL embedded in the R2RML will still be opaque). But I don't know what tools could be used to translate SQL and SPARQL texts to generic production rules using an RA vocabulary. The ultimate payoff from this approach is that it will be possible to link all of your data relations and operations with meaningful business terminology and processes. It will enable greater visibility and control of all data operations, and put important elements of business logic in transparent rules (e.g. RIF) instead of arcane notations such as SQL SPARQL (or worse, procedural code). Regards, --Paul
Re: Sparql To SQL
Hello All, This is what i’m trying to do. Loading data from a legacy database like DB2 or Oracle to Triple Store takes a long time (Its an OLTP DB) I’m firing some federated quries which needs to hit the database directly and retrieve the results. So, i need some process where sparql can be converted to SQL. -- Kjairam Sent with Airmail On 30 March 2014 at 10:22:14 pm, Martynas Jusevičius (marty...@graphity.orgmailto:marty...@graphity.org) wrote: Hey, have you tried D2RQ? http://d2rq.org Martynas On Sun, Mar 30, 2014 at 11:37 AM, Kamalraj Jairam kjai...@semanticsoftware.com.au wrote: Hello All, Whats the best way to convert sparql to SQL using R2RML mappings and convert resultset from DB to RDF? Thanks -- Kjairam Sent with Airmail
Re: Sparql To SQL
Hello Paul, These are the informtion i have 1) R2RML mapping for existing DB 2) I have some fedreated queries which hit the triple store containg the data which has been loaded from the DB The Loading data from DB (100 tables, millions of rows) to TS takes a long time. I need a framework to convert Sparql to SQL which will hit the table and return RDF result set. D2RQ is in version .81 and hasn’t changed much. Not sure whether D2RQ is the right approach. Thanks Kamalraj -- Kjairam Sent with Airmail On 31 March 2014 at 6:59:20 am, Paul Tyson (phty...@sbcglobal.netmailto:phty...@sbcglobal.net) wrote: On Sun, 2014-03-30 at 09:37 +, Kamalraj Jairam wrote: Hello All, Whats the best way to convert sparql to SQL using R2RML mappings and convert resultset from DB to RDF? What are the givens? Do you have existing SPARQL text written against some RDF produced by some existing R2RML mappings? Or do you have some SPARQL and some SQL and you want to fill in the R2RML and produce some RDF? In any case, it is an interesting scenario that will arise more often as companies expand their use of RDF while relying mostly on SQL. There is a higher abstraction that should be explored and possibly exploited to provide a general pattern for working through these situations. Since SQL, SPARQL, and R2RML are rule languages compatible with relational algebra (RA), it should be possible to derive a common set of RA predicates and classes to create an RDF vocabulary. This vocabulary can then be used to write queries as production rules in a generic standard rule language, such as RIF (Rule Interchange Format). The RIF source can be translated to SQL, SPARQL, or R2RML for execution in the target system. Going from RIF to SQL, SPARQL, or R2RML is always going to be easier than starting from SQL or SPARQL and going to some other format. Theoretically you should be able to partially translate R2RML to RIF automatically (SQL embedded in the R2RML will still be opaque). But I don't know what tools could be used to translate SQL and SPARQL texts to generic production rules using an RA vocabulary. The ultimate payoff from this approach is that it will be possible to link all of your data relations and operations with meaningful business terminology and processes. It will enable greater visibility and control of all data operations, and put important elements of business logic in transparent rules (e.g. RIF) instead of arcane notations such as SQL SPARQL (or worse, procedural code). Regards, --Paul
Re: Sparql To SQL
as mentioned D2RQ maps data from SQL to RDF so that SPARQL statements can execute against the SQL data. It can also be used to extract the relational data as RDF. The newest versions are supposed to do updates of the SQL as well, but I have not played with those versions. In the cases I had SPARQL queries of the SQL working for a project and the performance was sufficient for our needs. I have a project (https://github.com/Claudenw/jdbc4sparql) which essentially takes a SPARQL query and presents the results as a table in a JDBC driver. You can present multiple SPARQL statements as multiple tables. It is in early development and does not yet support functions and some other things that it should. Claude On Sun, Mar 30, 2014 at 9:10 PM, Kamalraj Jairam kjai...@semanticsoftware.com.au wrote: Hello All, This is what i’m trying to do. Loading data from a legacy database like DB2 or Oracle to Triple Store takes a long time (Its an OLTP DB) I’m firing some federated quries which needs to hit the database directly and retrieve the results. So, i need some process where sparql can be converted to SQL. -- Kjairam Sent with Airmail On 30 March 2014 at 10:22:14 pm, Martynas Jusevičius ( marty...@graphity.orgmailto:marty...@graphity.org) wrote: Hey, have you tried D2RQ? http://d2rq.org Martynas On Sun, Mar 30, 2014 at 11:37 AM, Kamalraj Jairam kjai...@semanticsoftware.com.au wrote: Hello All, Whats the best way to convert sparql to SQL using R2RML mappings and convert resultset from DB to RDF? Thanks -- Kjairam Sent with Airmail -- I like: Like Like - The likeliest place on the webhttp://like-like.xenei.com LinkedIn: http://www.linkedin.com/in/claudewarren
Re: Sparql To SQL
There are also commercial options, e.g. this: http://www.revelytix.com/content/spyder On Sun, Mar 30, 2014 at 10:15 PM, Kamalraj Jairam kjai...@semanticsoftware.com.au wrote: Hello Paul, These are the informtion i have 1) R2RML mapping for existing DB 2) I have some fedreated queries which hit the triple store containg the data which has been loaded from the DB The Loading data from DB (100 tables, millions of rows) to TS takes a long time. I need a framework to convert Sparql to SQL which will hit the table and return RDF result set. D2RQ is in version .81 and hasn't changed much. Not sure whether D2RQ is the right approach. Thanks Kamalraj -- Kjairam Sent with Airmail On 31 March 2014 at 6:59:20 am, Paul Tyson (phty...@sbcglobal.netmailto:phty...@sbcglobal.net) wrote: On Sun, 2014-03-30 at 09:37 +, Kamalraj Jairam wrote: Hello All, Whats the best way to convert sparql to SQL using R2RML mappings and convert resultset from DB to RDF? What are the givens? Do you have existing SPARQL text written against some RDF produced by some existing R2RML mappings? Or do you have some SPARQL and some SQL and you want to fill in the R2RML and produce some RDF? In any case, it is an interesting scenario that will arise more often as companies expand their use of RDF while relying mostly on SQL. There is a higher abstraction that should be explored and possibly exploited to provide a general pattern for working through these situations. Since SQL, SPARQL, and R2RML are rule languages compatible with relational algebra (RA), it should be possible to derive a common set of RA predicates and classes to create an RDF vocabulary. This vocabulary can then be used to write queries as production rules in a generic standard rule language, such as RIF (Rule Interchange Format). The RIF source can be translated to SQL, SPARQL, or R2RML for execution in the target system. Going from RIF to SQL, SPARQL, or R2RML is always going to be easier than starting from SQL or SPARQL and going to some other format. Theoretically you should be able to partially translate R2RML to RIF automatically (SQL embedded in the R2RML will still be opaque). But I don't know what tools could be used to translate SQL and SPARQL texts to generic production rules using an RA vocabulary. The ultimate payoff from this approach is that it will be possible to link all of your data relations and operations with meaningful business terminology and processes. It will enable greater visibility and control of all data operations, and put important elements of business logic in transparent rules (e.g. RIF) instead of arcane notations such as SQL SPARQL (or worse, procedural code). Regards, --Paul
Re: Sparql To SQL
There is also Sparqlify[1], which we use for exposing OpenStreetMap as LinkedData in the LinkedGeoData project[2] (and dumpig the RDF for downloads)[3]. Unfortunately, R2RML support not yet totally stable; we wrote our mappings[4] in what we refer to as Sparqlification Mapping Language (SML) [5] (release should be ready soon). In a nutshell, the relation between R2RML to SML is a bit akin to (the SPARQL elements of) SPIN to SPARQL, for a pretty comprehensive comparision of examples (the R2RML test suite) see [6]. Cheers, Claus [1] https://github.com/AKSW/Sparqlify (Instructions for installing Sparqlify from the debian package are included there) [2] LinkedGeoData: http://linkedgeodata.org [3] http://downloads.linkedgeodata.org/releases [4] https://github.com/GeoKnow/LinkedGeoData/blob/master/linkedgeodata-core/src/main/resources/org/aksw/linkedgeodata/sml/LinkedGeoData-Triplify-IndividualViews.sml [5] http://sml.aksw.org [6] http://sml.aksw.org/comparison/sml-r2rml-loc-table.html On 31.03.2014 01:29, Martynas Jusevičius wrote: There are also commercial options, e.g. this: http://www.revelytix.com/content/spyder On Sun, Mar 30, 2014 at 10:15 PM, Kamalraj Jairam kjai...@semanticsoftware.com.au wrote: Hello Paul, These are the informtion i have 1) R2RML mapping for existing DB 2) I have some fedreated queries which hit the triple store containg the data which has been loaded from the DB The Loading data from DB (100 tables, millions of rows) to TS takes a long time. I need a framework to convert Sparql to SQL which will hit the table and return RDF result set. D2RQ is in version .81 and hasn't changed much. Not sure whether D2RQ is the right approach. Thanks Kamalraj -- Kjairam Sent with Airmail On 31 March 2014 at 6:59:20 am, Paul Tyson (phty...@sbcglobal.netmailto:phty...@sbcglobal.net) wrote: On Sun, 2014-03-30 at 09:37 +, Kamalraj Jairam wrote: Hello All, Whats the best way to convert sparql to SQL using R2RML mappings and convert resultset from DB to RDF? What are the givens? Do you have existing SPARQL text written against some RDF produced by some existing R2RML mappings? Or do you have some SPARQL and some SQL and you want to fill in the R2RML and produce some RDF? In any case, it is an interesting scenario that will arise more often as companies expand their use of RDF while relying mostly on SQL. There is a higher abstraction that should be explored and possibly exploited to provide a general pattern for working through these situations. Since SQL, SPARQL, and R2RML are rule languages compatible with relational algebra (RA), it should be possible to derive a common set of RA predicates and classes to create an RDF vocabulary. This vocabulary can then be used to write queries as production rules in a generic standard rule language, such as RIF (Rule Interchange Format). The RIF source can be translated to SQL, SPARQL, or R2RML for execution in the target system. Going from RIF to SQL, SPARQL, or R2RML is always going to be easier than starting from SQL or SPARQL and going to some other format. Theoretically you should be able to partially translate R2RML to RIF automatically (SQL embedded in the R2RML will still be opaque). But I don't know what tools could be used to translate SQL and SPARQL texts to generic production rules using an RA vocabulary. The ultimate payoff from this approach is that it will be possible to link all of your data relations and operations with meaningful business terminology and processes. It will enable greater visibility and control of all data operations, and put important elements of business logic in transparent rules (e.g. RIF) instead of arcane notations such as SQL SPARQL (or worse, procedural code). Regards, --Paul -- Dipl. Inf. Claus Stadler Department of Computer Science, University of Leipzig Research Group: http://aksw.org/ Workpage WebID: http://aksw.org/ClausStadler Phone: +49 341 97-32260
Re: Sparql To SQL
If you want a commercial tool, please take a look at our tool, Ultrawrap: http://capsenta.com/ultrawrap/ Juan Sequeda +1-575-SEQ-UEDA www.juansequeda.com On Sun, Mar 30, 2014 at 3:10 PM, Kamalraj Jairam kjai...@semanticsoftware.com.au wrote: Hello All, This is what i’m trying to do. Loading data from a legacy database like DB2 or Oracle to Triple Store takes a long time (Its an OLTP DB) I’m firing some federated quries which needs to hit the database directly and retrieve the results. So, i need some process where sparql can be converted to SQL. -- Kjairam Sent with Airmail On 30 March 2014 at 10:22:14 pm, Martynas Jusevičius ( marty...@graphity.orgmailto:marty...@graphity.org) wrote: Hey, have you tried D2RQ? http://d2rq.org Martynas On Sun, Mar 30, 2014 at 11:37 AM, Kamalraj Jairam kjai...@semanticsoftware.com.au wrote: Hello All, Whats the best way to convert sparql to SQL using R2RML mappings and convert resultset from DB to RDF? Thanks -- Kjairam Sent with Airmail