Research Journal of Recent Sciences _________________________________________________ ISSN 2277-2502 Vol. 4(4), 66-70, April (2015) Res.J.Recent Sci. International Science Congress Association 66 A Survey on Automatic Mapping of Ontology to Relational Database Schema Afzal Humaira, Naz Tabbasum and Sadiq AyeshaDepartment of Computer Science, COMSATS Institute of Information Technology, M.A. Jinnah Campus, Defence Road, Lahore, PAKISTAN Available online at: www.isca.in,www.isca.me Received 30th November 2014, revised 26th January 2015, accepted 12th December 2015Abstract The semantic Web is gaining significance day by day. One of the main aims of Semantic Web is to make the web work like database. Ontology plays a significant role in Semantic Web and acts as a foundation stone in a building. With the fame of ontologies, we require an effective and immediate approach to change all ontology constructs into relational database automatically so that it could be queried effectively. The mapping of ontology information into relational database facilitates, multiple operations such as information seeking and recovery. A large volume of research work has been carried out on automatic conversion of RDF/OWL notions into database. However there exist issues in automatic conversion and mapping of ontology to relational database. In this review paper, we furnish state of the art and methodologies to automatically transform ontology to relational database. We also describe their drawbacks and benefits. We finally present the future research work for lossless and automatic mapping of ontology into relational database format. Keywords: Semantic web, OWL, schema conversion, lossless mapping. IntroductionThe main idea behind Semantic Web is the modification of current Web from human readable format to machine processable format. Due to Semantic Web, computers will be able to search, process, integrate and present the contents in a better, meaningful and intelligent manner. Ontology has been widely used in semantic web and other related fields. The purpose of ontology is to capture knowledge of related fields. Ontology is used to understand the structure of information and reuse of domain knowledge. There are different methods for storing ontologies. Ontologies can be stored in flat files. But flat-files do not support flexibility and diverse functionalities that can be provided by database system. Ontology management system can store ontology in ontology repositories. However querying ontology is not as developed at the moment as that of relational databases. The relational database schema has various benefits over ontology management system such as robustness, performance, maturity, availability and reliability. Large volume of web data is stored in relational format. So when ontology is documented in relational database it can interoperate with immense measure of existing data in relational format. Relational database gives scalability to the queries and reasoning on knowledge provided by ontology. Efficient reasoning and querying on ontology will make semantic web more useful. Mapping of ontology in relational database supports operations such assearching and retrieval. A lot of research work has been done on direct transformation of relational database to RDF/OWL concepts and description. Existing transformation approaches from OWL ontology to relational database, face certain problems i.e. data loss, structure loss, focus on the initial level mappings i.e. tables to classes and columns to properties. Most of transformation methods are semi-automatic and need human intervention. Some approaches claim that their method of transformation is fully automatic but the transformation process is incomplete and they lack handling important constructs of OWL. Existing tools, plug-ins and utilities are not easily accessible and need improvement. In this paper, we attempt to explore the problems with the existing tools and their solutions. This paper is structured as follows. Section 2 gives an introduction of semantic web technologies and relational database. Section-3 describes benefits and utilization of ontology to database approach. In section 4 and 5, we present existing approaches, their drawbacks and comparison. Section 6 concludes our work and provides some future directions. Preliminaries In this section, we give a short introduction of some aspects of semantic web technologies, relational database and define terms that will be used throughout the paper. Semantic Web: The semantic web was introduced by Tim Berners-Lee, inventor of the WWW, URIs, HTTP, and HTML. Basically, semantic web is the modification of current web. It provides an efficient way to search, share, combine and reuse of information. It provides common formats and language for exchanging of data. The semantic web is not a separate unit from the World Wide Research Journal of Recent Sciences _____________________________________________________________ ISSN 2277-2502Vol. 4(4), 66-70, April (2015) Res.J.Recent Sci International Science Congress Association 67 Web. It is extension of Web, which adds new data to the documents. The extension of Web documents will enable the Web to be processed automatically by machines. For this task RDF (Resource Description Framework) is used to change basic web data into structured data. RDF works on web pages and also useful in applications and databases. “Semantic web represents a set of semantically and formally interlinked data units - thereby creating a semantic web inside the Web” [Berners-Lee, RM]. But there exist two major differences between them given below. In semantic web, information is expressed in machine-targeted language, whereas the normal web contains information targeted at human consumption expressed in a wide range of natural languages. The semantic seb, presents semantically interconnected data, whereas in Web information is informally interconnecting . The basic aim of Semantic Web is to modify the web data in such a way that it is understandable to computers. It enables machines and applications to perform searching and consolidation for information without any human intervention. Ontology: According to Gruber-91, Ontology is defined as “An explicit specification of conceptualization.” Ontology contains a list of terms, and relationship between these terms. These terms used to explain important concepts of the domain. Ontology may include information such as classes and subclasses, properties, value restrictions, disjoint statements and individuals. Ontology improves the accuracy and efficiency of web search. At present, the most important ontology language is OWL. OWL is a description language for describing properties, classes, relations between classes, cardinality, equality, characteristics of properties (e.g. symmetry), and enumerated classes. Ontology has been widely used in Semantic Web and other related fields. The purpose of ontology is to capture knowledge of related fields. Ontology is used to understand the structure of information and reuse of domain knowledge . Relational Database: The concept of a relational database was first established in 1969 by Edgar Frank Codd. There are several advantages of a relational database over any other system i.e. solve data duplication, avoids inconsistent records, easier to change data, easier to change data format, data can be added and removed easily. The semantic web information display has association with relational databases model. The semantic web data model has connection with relational databases model. The mapping is direct. A record is an RDF node; the column name is RDF property type; and the record field (table cell) is a value. Applications of Ontology to Database Mapping Tool The importance of relational database in semantic web field is evident, so ontology to relational database mapping can be used in different applications or fields. Ontology can interoperate with a large amount of data that has already been stored in relational databases. Through mapping we can share information. Querying the system will be more advanced, robust and optimized. A common goal is the consolidation of distributive information in the form of common vocabulary. The building blocks in web engineering are ontology and relational database. And large amount of web data is stored in relational format. If relational schema and ontology were building independently, it complicates things. The majority of existing applications need integration among these systems. Through this mapping ontological data can be accessed from existing relational database applications5,6. Existing Approaches for Ontology to Database Mapping Technological advancement in semantic web requires improvement in semantic knowledge models. There is a need to do more research on automatic mapping of OWL ontology’s to relational database. Mostly research work has been done on direct transformation of relational database to RDF/OWL concepts and description. But problem exists in direct transformation and mapping of ontology concepts to relational database. Previous ontology to relational database transformation approaches e.g. OWL to ER and ER to OWL use conceptual graphs. They perform step-wise transformations where first step is to transform the OWL ontology to ER and second step is to transform ER to relational database. There is no direct transformation. Oracle Semantic data storage is also used but most OWL constructs are missing. The other approaches are “Storing ontology includes fuzzy data types” and “large scale ontology management” but they only cover main constructs of OWL and transformation is not fully automatic10. Galiet al. introduces a set of techniques for lossless mapping of OWL Ontology to relational database. In previous approaches special purpose database and an object oriented database system is used to store and retrieve ontological information. Below we can see some of the approaches for XML mapping such as edge, attribute, universal, normalized universal and basic in lining. Edge Approach: Store all the attributes information (object identities, name, and flag) in a single table called Edge table. Attribute approach: Attributes with the same name grouped into one table. Universal approach: Stores all attributes with separate columns for each attribute present in XML document. Research Journal of Recent Sciences _____________________________________________________________ ISSN 2277-2502Vol. 4(4), 66-70, April (2015) Res.J.Recent Sci International Science Congress Association 68 Normalized universal approach: Introduces separate overflow tables for multi valued attributes. Basic in lining approach: It maps the XML DTD into relations. OWL is based on XML syntax but there are a lot of constraints on OWL classes so the above approaches are not fully applicable while transforming OWL to relational database11. Mapping relational database to ontology consists of three parts such as ontology modeller, document manager and ontology reasoner. Ontology modeler takes OWL documents and creates an ontology model. All the constraints are considered and recorded during parsing. Document manager involves in processing and handling of OWL documents and use Jena for importing OWL documents. Ontology reasoner provides method for listing, getting and setting RDF type of sources11. Any approach to transform ontology to relational format should solve the problems e.g. loss of data during transformation, structure loss, applicability and have provable correctness. In previous approaches, there are some drawbacks e.g. ignore restrictions, not fully implemented, semi-automatic and do not analyse structure loss. To solve above issues Irina et.al proposes a new transformation approach based on “mapping rules”. These rules are applicable to any ontology (because specified on model level), and give definition how to transform OWL constructs to relational format. Irina et.al implemented their approach in a utility call “QUALEG DB” which automatically transforms OWL ontology to relational. This engine parses an OWL file and generates SQL script. It performs consistency and error checks. The drawback of this approach is some of OWL constructs are lost during transformation like sub- properties and some other are not considered e.g. property restrictions and its types12. Ernestas et al proposes an algorithm for transformation of ontology to relational database. Algorithm is based on OWL2DB approach. The algorithm is tested on ontology example taken from “product configuration” domain. Their approach only covers part of OWL DL syntax. So there is a need to represent more advanced OWL-Full features. Ernestas et al. propose some principles and algorithm for automatic transformation of OWL concepts to relational database. The classes in OWL ontology are mapped to tables in relational database, properties are mapped to relations and attributes and other ontological concepts like constraints are stored in special metadata table. They implemented the prototype tool as a plug-in for an ontology editor protégé. In their procedure they choose an OWL file through user interface module of tool. Next they present the ontology graphically and build connection to relational database server. That editor validates ontology description syntax and import OWL file into Jena API objects. Its “OWL to relational database transformation” module transforms OWL concepts to relational schema. It is observed that some ontological constructs are not transformed such as class complements, intersection, union and property relations. Further extension in their method is required13. Wei et al. discover simple mapping between OWL ontology to relational. Previous research work focuses on semi-automatic mapping approach. Research has been done to transform relational database and ontology into directed labeled graphs and reuse the schema matching tool “COMA”. There exist a plug-in “RONTO” to discover mapping between relational to OWL. But the above mentioned approaches ignore the structural differences in models. They do not apply any validation method for consistency and do not consider the issue to construct semantic mappings. They construct virtual documents for the entities in relational schema as well as ontology for semantic information. They calculate confidence measures between virtual documents with the help of TF/IDF model. They discover simple mappings using the above calculation and then validate the consistency of mapping. They create contextual mapping to specify the conditions of transformation to view-based mappings with the help of Context Match” algorithm. They implemented their approach in Java, MARSON. To evaluate MARSON two experiments were conducted, first to measure the performance of discovering simple mapping and second to measure the efficiency to create contextual mapping. Their approach is useful but requires machine learning techniques to get other useful semantic mappings14. Deise et al. provides a framework for storing XML files to relational called “X2Rel” and “OntoRel” tool implementation which provide a mechanism for transforming OWL ontology’s to relational. In their approach, they first generate ontology from XML documents with the help of “OntoGen” then transform OWL ontology to relational model by implementing OntoRel tool and apply certain transformation rules. The drawback of their approach is that it transforms only main OWL constructs and lack of suitable algorithm15. Ernestas et al presents the reversible and lossless transformation between OWL 2 ontology and relational database. The ontology classes, properties and instances are mapped to database tables with representing axioms. OWL restrictions are stored in meta-tables. They define transformation in QVT relational language. This language has the capability to define bidirectional transformation. But more research work is needed to improve query capabilities of the hybrid approach16. Ernestas et al proposed a hybrid to transform OWL ontology to relational. This transformation approach is based on common semantics of OWL and relational and the ontology constructs which have no direct equivalence in database. Meta tables are used in the process. For semantic preservation they introduce certain requirements like “Normalization rules” which should be fulfilled by ontology. Integrity rules for consistency of ontology are given. For implementation purpose, they created Vehicle ontology under these rules. Transforming ontology by applying “OWL 2 To RDB” plug –in of protégé. The method is fully Research Journal of Recent Sciences _____________________________________________________________ ISSN 2277-2502Vol. 4(4), 66-70, April (2015) Res.J.Recent Sci International Science Congress Association 69 automatic and transform most of Owl constructs into relational but do not provide support for existing ontology and cannot maintain changes in database schema as ontology changes17. Comparison of Ontology to Database Mapping ToolsIn the previous section, we have seen that there exist numerous approaches for OWL to relational database and opposite mapping however they have certain issues i.e. loss of structure, loss of information, manual and semi-automatic. They are limited and in many cases they just perform basic mappings i.e. tables to classes and columns to properties. In this section, we will compare these transformation approaches according to some requirements/criteria given below. The transformation procedure should not loss OWL constructs and structure of ontology. The transformation process should be automatic We summarized some existing approaches in table-1. We also provide the pros and cons of existing approaches. This discussion is based on twelve different existing approaches. Conclusion As the semantic Web is gaining popularity, there is a need of an efficient approach to map all ontology information in to relational database so that it can be queried easily. Mapping of ontology in relational data base facilitates operations like searching and retrieval. In this paper, we have studied, existing approaches to transform ontology (RDF/OWL) to database. We also discuss their pros and cons. Our study reveals that there exist many problems in direct transformation and mapping of ontology concepts to relational database. Our research community needs to develop a tool from OWL ontology to relational database that is fully-automatic and can handle wider range of OWL constructs. This type of tool is required so that people can easily convert their ontology to the database. This tool will also help them in quick data searching and retrieval. Table-1 Existing Approaches for Ontology to Database MappingApproach Theme Drawbacks OWL to ER and ER to OWL. Transform Ontology to conceptual model Use conceptual graphs for transformation They perform step-wise conversions where first stage is to convert the OWL ontology to ER and second stage is to change ER to relational database. Focus is only on main concepts transformation. Oracle Semantic data storage. Predefined facts are archived in database tables and might be specifically gained entrance to utilizing SQL queries. Only main constructs of OWLare handled. Storing ontology includes fuzzy data types. A schema structure can store ontology including fuzzy data types. It covers only main constructs of OWL Large scale ontology management10. Ontological information is directly represented in relational database tables. Semi-automatic Structure loss. Rule based transformation 11. Transformation is dependent upon just some set of standards that are connected to ontology. Some constructs are lost during transformation process (Property relations).Property restrictions are not considered. Transforming Ontology Representation from OWL to Relational Database12. Propose an algorithm for mapping. Only covers a part of OWL syntax Mapping of OWL ontology concepts to RDB Schemas approach 14. Use some principles and algorithm. Proposed the prototype tool as a plug-in for an ontology editor protégé Lacks mappings i.e. class complements, intersection, union, and property relations. Simple mapping between OWL ontology to relational database 15. Discover simple mappings using some mathematical calculations. Requires machine learning techniques to get other useful semantic mappings. Reversible Lossless Transformation From OWL 2 Ontologies Into Relational Database16A hybrid approach for reversible and lossless transformation. Needed to improve query capabilities of the hybrid approach. Research Journal of Recent Sciences _____________________________________________________________ ISSN 2277-2502Vol. 4(4), 66-70, April (2015) Res.J.Recent Sci International Science Congress Association 70 References 1.Grigoris A and Frank V.H., Semantic Web Primer, London: MIT press, (2003)2.Semantic web at www.webopedia.com /TERM/S/ Semantic_Web.html, accessed on 11-09-2012, (2012)3.Hamna k., Munira I. and NarmeenS..B., Web Accessibility Evaluation of News Websites Using WCAG 2.0, Research Journal of Recent Science,3(1), 7-13 (2014) 4.Raffat S.K., Siddiqui M.S., Siddiq M. and Shafiq F., Towards the Development of Web-based Ontology Development and Editing (WODE) Tool, Res. J. Recent Sci.,1(12), 67-69 (2012) 5.Datta S.B. and Gupta V.K., Performance Interoperability between RDBs and OODBs, Res. J. Recent Sci.,1(ISC-2011), 419-421 (2012) 6.Jitendra S. and Gupta V.K., Concurrency Issues of Distributed Advance Transaction Process, Res. J. Recent Sci.,1(ISC-2011), 426-429 (2012) 7.Neeraj S. and Swati L.S., Overview of Non-redundant Association Rule Mining, Res. J. Recent Sci.,1(2), 108-112 (2012) 8.Syed H.T, Juan S. and Danial M, Translating SQL Applications To The Semantic Web. In Proceedings of the 19th International Conference on Database and Expert System Application, LNCS, 5181, 450-464 (2008)9.Zhe W., Karl R, George E., Ankesh K. and Vladimir K., Implementing an Inference Engine for RDFS/OWL Constructs and User-Defined Rules in Oracle. In Proceedings of IEEE 24th international Conference on Data Engineering, Mexico, Cancum., 1239-1248 (2008)10.Richard G. and Juhnyoung L., Ontology Management for Large Scale Enterprise, Electronic Commerce Research and Applications, spring, 5(1),2-15(2006)11.Gali C., Chen K., Claypool and Uceda-Sosa R., From ontology to relational databases. In Workshop on Conceptual-Model Driven Web Information Integration and Mining, Shanghai, China, 3289, 278-289 (2005)12.Irina A., Ahto K. and Nahum K., Storing OWL Ontologies To Relational, International Journal Of Electrical, Computer, And Systems Engineering, 1(4),1307-5179 (2007) 13.Ernestas V. and Lina N.E., Mapping Of OWL Ontology Concepts To RDB Schemas, In proceedings of the 15th International Conference on Information and Software Technologies Kaunas, Lithuania, April 23-24, 2009. ISSN 2029-0020, 317-327 (2009) 14.Wei H. and Yuzhong Q., Discovering Simple Mappings Between Relational Database Schemas And Ontologies.In Proceedings of the 6th international the semantic web and 2nd Asian conference on Asian semantic web conference, 225-238, ISBN: 3-540-762973 978-3-540-76297-3 (2007)15.Deise D.B.S., Tobias D.C.A. and Eduardo K.P, Mapping OWL Ontologies To Relational schemas, In proceeding of Information Reuse and Integration (IRI), IEEE International Conference, (2011) 16.Ernestas V. and Lina N.E., Reversible Lossless Transformation From Owl 2 Ontologies Into Relational Database, Information Technology and Control, 40 (2011)17.Ernestas V. and Lina N.E,Preserving Semantics of Owl 2 Ontologies in Relational Databases Using Hybrid Approach, Information Technology and Control, 41(2),(2012)