SQL Query Construction from Ontology Concept Descriptions

Henrihs Gorskis


Based on the usage of previously proposed database concepts as mapping point to a database in a domain ontology, the present paper describes the process of constructing SQL queries from them. The proposed database concepts allow for the mapping of domain concept to the source of data from a database. The paper describes the process of traversing the class hierarchy in an ontology for gathering these database concepts and constructing the SQL query. The purpose of the constructed SQL query is to obtain data from a database to populate the ontology with instances related to a selected ontology concept. The described process begins with the selection of one ontology concept, obtaining all directly related concepts, filtering and collecting database concepts, and finally constructing the SQL query.


Data access; database mapping; ontology

Full Text:



H. Gorskis, L. Aleksejeva, and I. Poļaka, “Database Concepts in a Domain Ontology,” Information Technology and Management Science, vol. 20, no. 1, 2017, pp. 69–73. https://doi.org/10.1515/itms-2017-0012

H. Gorskis, L. Aleksejeva, and I. Poļaka, “Ontology-Based System Development for Medical Database Access.” Environment. Technology. Resources: Proceedings of the 11th International Scientific and Practical Conference. vol. 2, 2017, pp. 24–29. https://doi.org/10.17770/etr2017vol2.2572

M. Sir, Z. Bradac, P. Fiedler, “Ontology versus Database,” IFAC-PapersOnLine, vol. 48, no. 4, 2015, pp. 220–225. https://doi.org/10.1016/j.ifacol.2015.07.036

K. Munir, M. S. Anjum, “The use of ontologies for effective knowledge modelling and information retrieval,” Applied Computing and Informatics, vol. 14, no. 2, 2018, pp. 116–126. https://doi.org/10.1016/j.aci.2017.07.003

A. T. Elve, H. A Preisig, “From Ontology to Executable Program Code,” Computers & Chemical Engineering, 2018, accepted manuscript. https://doi.org/10.1016/j.compchemeng.2018.09.004

Y. Biletskiy, J. A. Brown, G. R. Ranganathan, E. Bagheri, I. Akbari, “Building a business domain meta-ontology for information pre-processing,” Information Processing Letters, vol. 138, 2018, pp. 81–88. https://doi.org/10.1016/j.ipl.2018.06.009

A. Konys, “Knowledge systematization for ontology learning methods,” Procedia Computer Science, vol. 126, 2018, pp. 2194–2207. https://doi.org/10.1016/j.procs.2018.07.229

R. Kontchakov, M. Rodríguez-Muro, M. Zakharyaschev, “Ontology-Based Data Access with Databases: A Short Course.” In Reasoning Web. Semantic Technologies for Intelligent Data Access. Reasoning Web 2013. Lecture Notes in Computer Science, vol. 8067. https://doi.org/10.1007/978-3-642-39784-4_5

G. Santipantakis, K. Kotis, G. A. Vouros, “OBDAIR: Ontology-Based Distributed framework for Accessing, Integrating and Reasoning with data in disparate data sources,” Expert Systems with Applications, vol. 90, 2017, pp. 464–483. https://doi.org/10.1016/j.eswa.2017.08.031

M. Benedikt, B. Cuenca Grau, E. V. Kostylev, “Logical foundations of information disclosure in ontology-based data integration,” Artificial Intelligence, vol. 262, 2018, pp. 52–95. https://doi.org/10.1016/j.artint.2018.06.002

D. Lembo, M. Lenzerini, R. Rosati, M. Ruzzi, D. F. Savo, “Inconsistency-tolerant query answering in ontology-based data access,” Web Semantics: Science, Services and Agents on the World Wide Web, vol. 33, 2015, pp. 3–29. https://doi.org/10.1016/j.websem.2015.04.002

S. D. Cardoso, C. Pruski, M. Da Silveira, “Supporting biomedical ontology evolution by identifying outdated concepts and the required type of change,” Journal of Biomedical Informatics, vol. 87, 2018, pp. 1–11. https://doi.org/10.1016/j.jbi.2018.08.013

DOI: 10.7250/itms-2018-0013


  • There are currently no refbacks.

Copyright (c) 2018 Henrihs Gorskis

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.