Two Layer Mapping from Database to RDF

Similar documents
Benchmarking RDF Production Tools

Annotation for the Semantic Web During Website Development

Semantic Web: vision and reality

Semantic web. Tapas Kumar Mishra 11CS60R32

The Semantic Web & Ontologies

Semantic Web Publishing. Dr Nicholas Gibbins 32/4037

OSDBQ: Ontology Supported RDBMS Querying

Mapping between Digital Identity Ontologies through SISM

> Semantic Web Use Cases and Case Studies

A tutorial report for SENG Agent Based Software Engineering. Course Instructor: Dr. Behrouz H. Far. XML Tutorial.

COMP9321 Web Application Engineering

COMP9321 Web Application Engineering

a paradigm for the Introduction to Semantic Web Semantic Web Angelica Lo Duca IIT-CNR Linked Open Data:

Semantic Web Mining and its application in Human Resource Management

Multi-agent Semantic Web Systems: RDF Models

Semantic Web and Electronic Information Resources Danica Radovanović

WebGUI & the Semantic Web. William McKee WebGUI Users Conference 2009

Web Design for the Semantic Web

Agent-Enabling Transformation of E-Commerce Portals with Web Services

CHAPTER 1 INTRODUCTION

KawaWiki: A Semantic Wiki Based on RDF Templates

STARCOUNTER. Technical Overview

XML Metadata Standards and Topic Maps

Orchestrating Music Queries via the Semantic Web

Transforming Data from into DataPile RDF Structure into RDF

The Semantic Planetary Data System

Semantic Web Systems Introduction Jacques Fleuriot School of Informatics

Semantic Web Domain Knowledge Representation Using Software Engineering Modeling Technique

Hyperdata: Update APIs for RDF Data Sources (Vision Paper)

Semantic Web Road map

Design concepts for data-intensive applications

A Tagging Approach to Ontology Mapping

Collaborative Ontology Construction using Template-based Wiki for Semantic Web Applications

New Approach to Graph Databases

Europeana update: aspects of the data

Porting Social Media Contributions with SIOC

New Tools for the Semantic Web

Ontology Development Tools and Languages: A Review

WWW today ME-E4300 Semantic Web,

From the Web to the Semantic Web: RDF and RDF Schema

Information Retrieval (IR) through Semantic Web (SW): An Overview

Information mining and information retrieval : methods and applications

Text Mining and the. Text Mining and the Semantic Web. Semantic Web. Tim Finin. University of Maryland Baltimore County

Artificial Intelligence Techniques. Internet Applications 2

The Semantic Web. What is the Semantic Web?

The Point of View Axis: Varying the Levels of Explanation Within a Generic RDF Data Browsing Environment

Towards the Semantic Desktop. Dr. Øyvind Hanssen University Library of Tromsø

XML ALONE IS NOT SUFFICIENT FOR EFFECTIVE WEBEDI

Pedigree Management and Assessment Framework (PMAF) Demonstration

An RDF NetAPI. Andy Seaborne. Hewlett-Packard Laboratories, Bristol

Payola: Collaborative Linked Data Analysis and Visualization Framework

CDL-based Semantic Representation for Web Databases

Semantic-Based Web Mining Under the Framework of Agent

Comparative Study of RDB to RDF Mapping using D2RQ and R2RML Mapping Languages

Profiles Research Networking Software API Guide

Development of Contents Management System Based on Light-Weight Ontology

SEPA SPARQL Event Processing Architecture

Are you afraid of Semantic Web?

Web Applications Usability Testing With Task Model Skeletons

Making Semantic Web based-hypermedia Applications

Finding Similarity and Comparability from Merged Hetero Data of the Semantic Web by Using Graph Pattern Matching

JENA: A Java API for Ontology Management

Lecture Telecooperation. D. Fensel Leopold-Franzens- Universität Innsbruck

An Annotation Tool for Semantic Documents

From Online Community Data to RDF

Improving Adaptive Hypermedia by Adding Semantics

The Semantic Web: A Vision or a Dream?

Content Development Reference. Including resources for publishing content on the Help Server

Copyright 2014 Blue Net Corporation. All rights reserved

Introduction. October 5, Petr Křemen Introduction October 5, / 31

The notion delegation of tasks in Linked Data through agents

The Semantic Web DEFINITIONS & APPLICATIONS

Chapter 3. Architecture and Design

Dynamic Models - A case study in developing curriculum regulation and conformity using Protege

01 INTRODUCTION TO SEMANTIC WEB

Design of an inference engine for the semantic web

State of the Art of Semantic Web

An Approach to Enhancing Workflows Provenance by Leveraging Web 2.0 to Increase Information Sharing, Collaboration and Reuse

Semantic Adaptation Approach for Adaptive Web-Based Systems

Chapter 10 Web-based Information Systems

open source community experience distilled

Semantic agents for location-aware service provisioning in mobile networks

Using Semantic Web Technologies for context-aware Information Providing to Mobile Devices

Sindice Widgets: Lightweight embedding of Semantic Web capabilities into existing user applications.

Contents. G52IWS: The Semantic Web. The Semantic Web. Semantic web elements. Semantic Web technologies. Semantic Web Services

Using RDF to Model the Structure and Process of Systems

INF3580/4580 Semantic Technologies Spring 2015

Semantic Web Fundamentals

Linked Data: What Now? Maine Library Association 2017

Personalized Faceted Navigation in the Semantic Web

Controlling User Access

Knowledge and Ontological Engineering: Directions for the Semantic Web

Service Integration - A Web of Things Perspective W3C Workshop on Data and Services Integration

Semantic search and reporting implementation on platform. Victor Agroskin

Web Technologies Present and Future of XML

RDFGraph: New Data Modeling Tool for

Unit 1 a Bird s Eye View on RDF(S), OWL & SPARQL

EWG-DSS Collab-Net V.2. Applying Ontology in the Analysis of a Research Collaboration Network

Ontology-Based Schema Integration

Publishing Math Lecture Notes as Linked Data

Transcription:

Two Layer Mapping from Database to Martin Svihla, Ivan Jelinek Department of Computer Science and Engineering Czech Technical University, Prague, Karlovo namesti 13, 121 35 Praha 2, Czech republic E-mail: svihlm1@fel.cvut.cz, jelinek@fel.cvut.cz Abstract There is a huge mass of data stored in relational databases. Large part of these data is exposed on the web in HTML presentations. The idea of the Semantic Web is to add computer-readable meaning to data on the web to extend its possibilies. The automatic generation of Semantic Web content from relational databases is not new issue, but current approaches are not directly usable for common programmers of web presentations. This fact may inhibit wide spread of Semantic web concept. In this paper we present METAmorphoses - two layer model of ontology based mapping of relational database content to as a proposal of easy-to-use solution. 1. Introduction It is well known that the World Wide Web has become a huge source of information. These information are difficult to search or maintain not only because of their quantity but also because they are mostly presented only for humans to read and understand. Semantic Web is an initiative, which tries to give more structure and computer understadable meaning to the data on the web. This extension of current web should enable computers and people to work in better cooperation [1]. The three basic technologies for the Semantic Web are XML (extensible Markup Language) [6], (Resource Description Framework) [7] and ontologies. Language of metadata is, which uses XML tags to write triples. By these triples, a semantic is formulated like an elementary sentence consisting of subject, verb and object. In this way we can make assertions that a subject, e.g. person, has a property, e.g. is a friend of, with a particular value, such as another person. Ontologies were added to the concept of the Semantic Web to formally describe terms used in metadata. Ontology defines terms used in document, relations between them and also provides inference rules, which allows a software agent to deduce new facts from those asserted in metadata. Success of the Semantic Web also depends on mass creation of semantic data, that are expected to cover existing Web by machinereadable meaning [3]. To reach this goal, several approaches were designed. Some of them assume that data sources are static and propose manual or semiautomatic annotation of existing HTML presentations. However, the most of web content today is generated dynamically from relational databases. That means that mapping from database schema directly to is much faster, cheaper and usually more suitable for generation of Semantic Web content. In our work we propose approach to such mapping, which is focused on usability. 2. Current solutions of mapping SQL to There are two main approaches of dealing with relational database in order to present data in language [8]. In the first case data are stored in a database like triples and there is system, which can query these data directly in way. Other approach is when data are stored in classic relational schema and there is some mapping to. As far as the most of data today are stored in classic relational schema, our work is focused to the latter approach. Figure 1 illustrates common logic of SQL

Fig. 1: /SQL mapping schema Person +Name Project +Age z +Name +Type +Homepage DATA 2 SQL/ Mapping 3 4 Ontology <person> <hasname/> <hasproject/> </person> 1 Request Response to mapping. Mapping is created according to SQL structure and ontology. When there is a request for, it is translated to SQL query. Results of query are translated to and this is sent as response. There are some existing projects solving the question of SQL/ mapping (e.g. [5], [4], [3] and others). They do what they were designed for, but they don t make creation much more easier for common programmers. An ideal providing information is as simple as providing HTML [2] is still far away. As an answer to this challenge, we propose METAmorphoses, database to mapping design for easy use. 3. METAmorphoses - proposal of two layer mapping In this section we present METAmorphoses, two layer model of SQL to mapping based on given ontology. This concept is designed to allow flexible mapping and easy production of. 3.1 Problem overview Two main presumpsions in our work are: data are stored in classical relational database schema and we have an ontology that specifies format of metadata we want to produce from the database. In this paper we propose a system which maps data from the database to an document. This system should be simple and efficient. Our main goal is to design system providing simple programing interface, so that programmers who creates web presentation can compose fragments of document as easy as they composes HTML fragments using Java servlets, JSP, ASP or PHP. 3.2 System architecture In order to achieve flexible mapping and high usability, we devided METAmorphoses logic into two separated parts that we call mapping and template layer. The mapping layer maps classes to SQL structures. The template layer uses this mapping and produces instances in the way which is driven by a template. Both layers are described in following sections. Fig. 2: METAmorphoses architecture DATA Result set SQL query composition 3.3 Mapping layer Template layer SQL/ Mapping layer request Template description Mapping This layer is responsible for mapping of database content to document accord-

ing to given ontology. The core of the layer is simple SQL to mapping language. Language is slightly inspired by D2R MAP [4], but it can also serve for other purposes than mapping according to the system design. Listing 1: Mapping language sample <Mapping > < Class templatename =" person " rdflabel =" foaf : Person " sql =" select * from person " > < ClassCondition templatename =" username " wherestring =" username ="/ > < Variable templatename =" personid " sqlname =" id "/ > < Property templatename =" firstname " rdflabel =" foaf : firstname " sqlname =" first_name "/ > < Property templatename =" surname " rdflabel =" foaf : surname " sqlname =" family_name "/ > < Property templatename =" currentproject " rdflabel =" =""/ > </ Class > foaf : currentproject " sqlname < Class templatename =" project " rdflabel =" foaf : Project " sql =" select * from project p, person_ project pp where p. id = pp. project_id "> < ClassCondition templatename =" personid " wherestring =" pp. person_ id ="/ > < Property templatename =" projecthomepage " rdflabel =" "/ > </ Class > </ Mapping > foaf : homepage " sqlname =" web Mapping language is based on XML. It is designed to map classes of given ontology to database structure, as it can be seen from sample code fragment (listing 1). This means that we create a mapping only for classes we are going to need, so we don t have to map necessarily all database structures. Each class contains SQL statement and optionaly set of possible properties of the class, conditions and variables. Properties of class tag in mapping stands for properties in ontology, conditions and variables controls generation and are used in template layer. To estabilish a communication with the template layer, there are attributes called templatename in each of the elements. Mapping elements contain also particular tag names. That means generation can be processed without support of any API. This is important efficiency factor. Once a proper mapping is created, it preserves consistency of generated according to given ontology. The mapping contains also information about database connection and information about namespaces in produced. 3.4 Template layer In METAmorphoses design, template layer produces instances according to information in mapping layer. It can call all elements of mapping in order to build document. This control is done by another XML document - template. This template is written by programmer of Semantic Web presentation. In template is specified how an instance will be composed, which properties it will contain and so. Listing 2: Template language sample <Template > < putinstance name =" person " id="1"> < Condition name =" username "> svihlm1 </ Condition > < putproperty name =" firstname "/> < putproperty name =" surname "/> < putproperty name =" currentproject " > < putinstance name =" project "> < Condition name =" personid "> < Variable id="1" name =" personid "/> </ Condition > < putproperty name =" projecthomepage "/ > </ putproperty > </ Template > Each element in template has an attribute name which corresponds with templatename in mapping. This is the way both layers are linked.

Template contains tags putinstance and putproperty to put fragments of produced by mapping layer to final document. However, rules how to use these tags are stored in mapping. Tags Condition and Variable are control elements that controls using of the previous two tags. For example, following fragment writes to document all persons from database with their first name. < putinstance name =" person "> < putproperty name =" firstname "/> In the next modification there is the condition that reduces selected persons to one with username svihlm1. Tags putproperty says that first name and surname will be written in person element. < putinstance name =" person "> < Condition name =" username ">svihlm1 </ Condition > < putproperty name =" firstname "/> < putproperty name =" surname "/> Content of condition tag can be literal, as in listing above, or Variable tag, as in listing 2. Variables have id attribute for refering to corresponding instance (see listing 2). This is the way METAmorphoses can handle more complex constructions. The result from mapping (listing 1) and template (listing 2) samples will be following piece of document. Listing 3: Sample fragment <foaf:person > < foaf:firstname > Martin </ foaf: firstname > <foaf:surname > Svihla </ foaf:surname > < foaf: currentproject > <foaf:project > < foaf:homepage > http: // www. cgg. cvut.cz /~ svihlm1 / metamorphoses / </ foaf: homepage > </ foaf:project > </ foaf: currentproject > </ foaf:person > As far as the language used in template layer is also XML-based, programmer can compose document easily using template tags like they were fragments of. No query language is needed nor any additional API. This means the template can be included for example directly to JSP page by JSP custom tags. Then template tags can be combined with JSP tags in order to dynamic publishing of document. 3.5 Mapping process Process of mapping of database structure to in METAmorphoses is simple. However, due to two layer design it has two phases. The first one is creating mapping document. This should contain all classes with their properties how they are defined in particular ontology. These classes should be connected with mapping variables and conditons. When the mapping is complete, the simple list of its elements can be created to help with template building. The second phase is writing a template. Each template contains reference to corresponding mapping and works with elements defined in it to create fragment. It is possible to create many templates upon one mapping. The template can be contained in JSP page as part on (X)HTML document, or can be called from servlet container to produce standalone document. 3.6 production Mapping and template documents are processed by METAmorphoses processor, which is written in Java. Processor is also divided into two logical parts - a mapping processor and a template processor. When request for is received, processor finds proper piece of template. Then it loads corresponding mapping, connects database and creates list of used classes. In the next step template is processed hierarchically, considering conditions and variables to query database for data, which are used to build fragments. In this phase an URI is created for instances.

Once the template processing is over, is sent to server as response. 4. Discussion and results This paper discussed only basic ideas of METAmorphoses design. Some issues were not mentioned here, for example a way how the URI is created in. Main advantages of proposed concept are flexibility in database mapping and simple programmer interface. Flexibility means that the mapping language of METAmorphoses is capable to capture any ontology. However, it is not practical to write very complex constructions manually. For this purpose a mapping tool is planned that would ensure ontology as well as SQL integrity. This integrity is useful, because when the proper mapping is done, validity of output is ensured without using additional software packages. Simple programmer interface of METAmorphoses is realized by templates. They are XML-based and can be part of e.g. JSP page, so that production of fragment is as easy as production of HTML. And, in addition to that, as far as validity of is guaranteed by mapping layer, one who writes template doesn t have to know anything about ontologies. Question of consistency of our mapping model was also taken into account. data model is based on triple schema of subject ( class), verb ( property) and object (literal or another class). As far as our mapping schema allows including instances in properties of other instances, it can be seen as directed graph of triples. Of course, METAmorphoses model still has week points. Due to two layer structure, it is possible that if ontology was updated, not only mapping, but also templates would have to be changed. The question of optimal database querying was not also taken into account during mapping language design. We have done some tests yet with METAmorphoses on an experimental set of data and simple ontologies. Promising results of these experiments shows that our concept fulfills our expectations. 5. Conclusion and future work In this paper we have presented METAmorphoses, two layer mapping model of relational database schema to according to given ontology. This approach is meant as solution, that should simplify work of authors of Semantic Web presentations. It is necessary to mention that METAmorphoses is not an implementation issue. It is combination of two simple XML languages that cooperates in order to map SQL structure into elements and to publish produced easily. METAmorphoses processor is deployed just as proof-of-concept of our idea and testing tool for our work. In future we plan implementation of the mapping tool for more complex mappings. Then we want to focus on testing our concepts in real environment. We hope that results from real-world experiments would be accomplished very soon, because they would help to improve design and implementation of METAmorphoses. References [1] Berners-Lee, T., Hendler, J., Lassila, O.: The Semantic Web. Scientific American, May 2001 [2] Hjelm, J.: Creating the Semantic Web with. Wiley Computer Publishing, New York, 2001 [3] Handschuh, S., Staab, S., Volz, R.: On Deep Annotation. Proceedings of the 12th International World Wide Web Conference, WWW 2003, ACM Press, 2003 [4] Bizer, Ch.: D2R MAP - A Database to Mapping Language. Proceedings of the 12th International World Wide Web Conference, WWW 2003, Budapest, Hungary, 2003 [5] Stojanovic, N., Stojanovic, L., Volz, R.: A reverse engineering approach for migrating data-intensive web sites to the Semantic Web, IIP-2002, Montreal, 2002 [6] Extensible Markup Language (XML). March 2004, http://www.w3.org/xml/

[7] Resource Description Framework (). March 2004, http://www.w3.org// [8] Beckett, D., Grant J.: Mapping Semantic Web Data with RDBMSes. March 2004, http://www.w3.org/2001/sw/europe/ reports/scalable rdbms mapping report/