Abstract
Most of the existing structured digital information today is still stored in relational databases. That’s why it is important for the Semantic Web effort to expose the information in relational databases as RDF, or allow to query it using SPARQL. Direct mapping is a fully automated approach for converting well-structured relational data to RDF that does not require formulating explicit mapping rules [2, 8]. Along with the mapped RDF data, it is desirable to have a description of that data. Previous work [3, 8] has attempted to describe the RDF graph in terms of OWL axioms, which is problematic, partly due to the open world semantics of OWL. We start from the direct mapping suggested by Sequeda et al. [8], which integrates and extends the functionalities of proposal [10] and the W3C recommendation [2], and present a source-to-target semantics preserving rewriting of constraints in an SQL database schema to equivalent SHACL [7] constraints on the RDF graph. We thus provide a SHACL description of the RDF data generated by the direct mapping without the need to perform a costly validation of those constraints on the generated data. Following the approach of [8], we define the rewriting from SQL constraints to SHACL by a set of Datalog rules. We prove that our source-to-target rewriting of constraints is constraint preserving and weakly semantics preserving.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
- 2.
- 3.
For \(n=1\) the same requirement could be expressed using dash:uniqueValueForClass from http://datashapes.org/constraints.html, but not for larger n.
- 4.
- 5.
e.g., using SPARQL-based Target Types in https://www.w3.org/TR/shacl-af/.
References
Abiteboul, S., Hull, R., Vianu, V.: Foundations of Databases, vol. 8. Addison-Wesley, Reading (1995)
Arenas, M., Bertails, A., Prud’hommeaux, E., Sequeda, J.: A direct mapping of relational data to RDF. W3C recommendation, W3C, September 2012
Calvanese, D., Fischl, W., Pichler, R., Sallinger, E., Simkus, M.: Capturing relational schemas and functional dependencies in RDFS. In: Twenty-Eighth AAAI Conference on Artificial Intelligence (2014)
Cyganiak, R., Wood, D., Lanthaler, M.: RDF 1.1 concepts and abstract syntax. W3C recommendation, W3C, February 2014
Das, S., Sundara, S., Cyganiak, R.: R2RML: RDB to RDF mapping language, W3C recommendation, W3C (2012)
Jiménez-Ruiz, E., et al.: BootOX: practical mapping of RDBs to OWL 2. In: Arena, M., et al. (eds.) ISWC 2015. LNCS, vol. 9367, pp. 113–132. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-25010-6_7
Knublauch, H., Kontokostas, D.: Shapes constraint language (SHACL). W3C recommendation, W3C, July 2017
Sequeda, J.F., Arenas, M., Miranker, D.P.: On directly mapping relational databases to RDF and OWL. In: Proceedings of 21st International Conference on World Wide Web, pp. 649–658. ACM (2012)
Thapa, R.B., Giese, M.: A source-to-target constraint rewriting for direct mapping. Technical report Nr 498, Department of Informatics, University of Oslo, July 2021
Tirmizi, S.H., Sequeda, J., Miranker, D.: Translating SQL applications to the semantic web. In: Bhowmick, S.S., Küng, J., Wagner, R. (eds.) DEXA 2008. LNCS, vol. 5181, pp. 450–464. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-85654-2_40
Xiao, G., Calvanese, D., Kontchakov, R., et al.: Ontology-based data access: a survey. In: Proceedings of International Joint Conference on Artificial Intelligence. Survey Track, pp. 5511–5519. IJCAI Organization (2018)
Acknowledgements
This work was supported by the Norwegian Research Council via the SIRIUS Centre for Research Based Innovation, Grant Nr. 237898. We thank Evgeny Kharlamov and Egor Kostylev for many fruitful discussions, Holger Knublauch for help with SHACL-SPARQL, and Roman Kontchakov for invaluable assistance in preparing the final version.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2021 Springer Nature Switzerland AG
About this paper
Cite this paper
Thapa, R.B., Giese, M. (2021). A Source-to-Target Constraint Rewriting for Direct Mapping. In: Hotho, A., et al. The Semantic Web – ISWC 2021. ISWC 2021. Lecture Notes in Computer Science(), vol 12922. Springer, Cham. https://doi.org/10.1007/978-3-030-88361-4_2
Download citation
DOI: https://doi.org/10.1007/978-3-030-88361-4_2
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-88360-7
Online ISBN: 978-3-030-88361-4
eBook Packages: Computer ScienceComputer Science (R0)