Efficient SPARQL to SQL Translation with User Defined Mapping
The RDF framework is becoming popular for presenting data. It makes the data easily accessible and queryable. However, the most common way how to store structured data is to use a relational database system. It is essential to create a mapping between these two worlds, to publish the data stored in a relational database in the RDF format. That can be effectively achieved by a virtual SPARQL endpoint over relational data.
There are already existing tools providing virtual SPARQL endpoints, but as we will show in the paper there is still space for improvement. In this paper we propose an algorithm to query RDF data stored in a relational database with an user defined mapping. Our aim is to generate SQL queries which can be effectively executed on the relational engines. In comparison to existing approaches we do not rely only on the optimizations of the relational query, but the SPARQL query first.
KeywordsRDB2RDF R2RML SPARQL Relational to RDF mapping
This work was supported in part by the Charles University in Prague, project GA UK No. #158215 and in part by the Czech Science Foundation (GACR), grant number 16-09713.
- 4.Cheng, Q., Gryz, J., Koo, F., Leung, T.Y.C., Liu, L., Qian, X., Schiefer, K.B.: Implementation of two semantic query optimization techniques in DB2 universal database. In: Proceedings of the 25th International Conference on Very Large Data Bases VLDB 1999, San Francisco, CA, USA, pp. 687–698. Morgan Kaufmann Publishers Inc (1999)Google Scholar
- 5.Cyganiak, R.: D2RQ: Accessing Relational Databases as Virtual RDF Graphs. http://d2rq.org/. Accessed 15 May 2015
- 6.Das, S., Cyganiak, R., Sundara, S.: R2RML: RDB to RDF Mapping Language. W3C Recommendation, W3C September 2012. http://www.w3.org/TR/2012/REC-r2rml-20120927/
- 7.Harris, S., Seaborne, A.: SPARQL 1.1 query language. W3C Recommendation W3C March 2013. http://www.w3.org/TR/2013/REC-sparql11-query-20130321/
- 8.Lacroix, M., Pirotte, A.: Domain-oriented relational languages. In: Proceedings of the Third International Conference on Very Large Data Bases, 6–8 October 1977, Tokyo, Japan, pp. 370–378. IEEE Computer Society (1977)Google Scholar
- 10.Priyatna, F., Corcho, O., Sequeda, J.: Formalisation and experiences of R2RML-based SPARQL to SQL query translation using morph. In: Proceedings of the 23rd International Conference on World Wide Web WWW 2014, pp. 479–490. ACM, New York (2014)Google Scholar
- 12.Rodriguez-Muro, M., Rezk, M., Hardi, J., Slusnys, M., Bagosi, T., Calvanese, D.: Evaluating SPARQL-to-SQL translation in ontop. In: Proceedings of the 2nd International Workshop on OWL Reasoner Evaluation (ORE). CEUR Workshop Proceedings, vol. 1015, pp. 94–100. CEUR-WS.org (2013). http://ceur-ws.org/Vol-1015/paper_16.pdf