77
Ontology-based Cooperation of Information Systems Contributions to Database-to- Ontology Mapping and XML-to- Ontology Mapping Raji GHAWI 15/03/2010

Ontology-based Cooperation of Information Systems

Embed Size (px)

DESCRIPTION

the slides of my PhD defense - March 2010

Citation preview

Page 1: Ontology-based Cooperation of Information Systems

Ontology-based Cooperation of Information Systems

Contributions to Database-to-Ontology Mapping and XML-to-Ontology Mapping

Raji GHAWI

15/03/2010

Page 2: Ontology-based Cooperation of Information Systems

15/03/2010 2

Outline

Introduction State of the Art OWSCIS System Database-to-Ontology Mapping

Mapping Specification

Mapping Process

Query Translation XML-to-Ontology Mapping

Mapping Specification

Mapping Process

Query Translation Conclusion

Page 3: Ontology-based Cooperation of Information Systems

15/03/2010 3

Introduction

Cooperation of Information Systems:

sourcesource

source

query

answer

Share, combine and exchange

information from distributed and

heterogeneous sources in a

transparent way to the end-users

Page 4: Ontology-based Cooperation of Information Systems

15/03/2010 4

Introduction

Heterogeneity structural

syntactic

system

semantic

scaling & units naming

language model

schema

representation

hardware

operating system

synonymy homonymy

Page 5: Ontology-based Cooperation of Information Systems

15/03/2010 5

State of the Art - Approaches

Semantic Approaches

FederationFederation MediationMediation

Source 1 Source 2 Source 1 Source 2

Mediator

Wrapper

Page 6: Ontology-based Cooperation of Information Systems

15/03/2010 6

State of the Art – Ontologies

Ontologies promised technology to solve the semantic heterogeneity explicit specification of a conceptualization

conceptual model for information sources

Ontology-based cooperation of information systems

Page 7: Ontology-based Cooperation of Information Systems

15/03/2010 7

Ontology-based Cooperation of Information Systems

Features Information Sources (RDBs, XML, …)

Ontology Use (Single, Multiple, Hybrid)

Representation Language (RDF/S, OWL)

Architecture Type (agent-based, wrapper-mediator)

Existing Systems

BUSTER, COIN, DOME, InfoSleuth, KRAFT, MOMIS, …

Page 8: Ontology-based Cooperation of Information Systems

15/03/2010 8

Objectives of the Work

Propose an architecture for cooperation of information sources

Taking into account the semantics of information

Ontologies

Specify methods and tools

Allowing a transparent querying of the cooperation by users Mapping of information sources to ontologies

Page 9: Ontology-based Cooperation of Information Systems

15/03/2010 9

Our Proposal: OWSCIS

Support RDBs and XML Hybrid Ontology Approach OWL language

Mediation-based Architecture GAV approach at site level LAV approach at global level

Ontology & Web Service based Cooperation of Information Systems

Global Ontology

Local Ontologies

Information Sources

Page 10: Ontology-based Cooperation of Information Systems

15/03/2010 10

OWSCIS Architecture

Global Ontology

MappingDirectory

Knowledge Base Module

End User

Querying Web Service

ResultsRecomposition

Query Decomposition

VisualizationWeb Service

sub-queriespartial results

Relationaldatabase

XML data source

Data Providers

DB2OWLX2OWL

Local ontology

Data Source toLocal Ontology

Mappings

Local Ontology to Global Ontology

Mappings

Mapping Web Service

Page 11: Ontology-based Cooperation of Information Systems

15/03/2010 11

Database-to-Ontology Mapping Mapping Specification

Mapping Process

Query Translation

XML-to-Ontology Mapping Mapping Specification

Mapping Process

Query Translation

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

Page 12: Ontology-based Cooperation of Information Systems

15/03/2010 12

Database-to-Ontology Mapping Mapping Specification

Mapping Process

Query Translation

XML-to-Ontology Mapping Mapping Specification

Mapping Process

Query Translation

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

Page 13: Ontology-based Cooperation of Information Systems

15/03/2010 13

Database-to-Ontology Mapping

OntologyDatabase

Mappings

Tables

Columns

Primary Keys

...

Concepts

Datatype Properties

Object Properties

...

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

Associations with SQL statements DOML language

Page 14: Ontology-based Cooperation of Information Systems

15/03/2010 14

Associations with SQL Statements

Ontology components are associated with SQL statements

Concept Association the SQL statement retrieves the primary key of corresponding table

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

SELECT Paper.paperId AS DOM FROM Paper

PaperPaperCPaper

Page 15: Ontology-based Cooperation of Information Systems

15/03/2010 15

Associations with SQL Statements

Object Property Association the SQL statement retrieves the primary keys of tables corresponding

to the domain and range concepts

Datatype Property Association the SQL statement retrieves the primary key of table corresponding to

the domain concept and the column of range value

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

publishedBypublishedByOP

SELECT Paper.paperId AS DOM, Publisher.publisherId AS RNG FROM Paper, Publisher WHERE Paper.publisher = Publisher.publisherId

Paper PublisherPaper.publisher Publisher.publisherId

SELECT Paper.paperId AS DOM, Paper.title AS RNG FROM Paper

titletitleDPPaperPaper.title

Page 16: Ontology-based Cooperation of Information Systems

15/03/2010 16

Associations with SQL Statements

Advantages simple and easy to edit directly exploited in query translation

Drawbacks poor

limited to SQL syntax can not express 1-m mappings

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

Page 17: Ontology-based Cooperation of Information Systems

15/03/2010 17

DOML Language

Semantic bridges relate ontology components to database components

based on RDF (Resource Description Framework)

Combination of existing languages: D2RQ, R2O, Relational.OWL

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

Database to Ontology Mapping Language

Page 18: Ontology-based Cooperation of Information Systems

15/03/2010 18

DOML Language

Concept bridge relates an ontology concept with a DB table possibly, contains a condition

Object property bridge relates an object property with a join of DB tables belongs to a concept bridge (domain) refers to another concept bridge (range ) condition

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

student-cb ont:Studentont:Student personperson person.status="student"person.status="student"

concept table condition

works-for-opb ont:works-foront:works-for emp.deptId = dept.deptIdemp.deptId = dept.deptId employee-cb department-cb

object property join domain concept bridge range concept bridge

Page 19: Ontology-based Cooperation of Information Systems

15/03/2010 19

DOML Language

Datatype property bridge relates a datatype property with a DB column or transformation belongs to a concept bridge (domain) possibly, contains a condition

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

person-age-dpb ont:ageont:age person.ageperson.age person-cb

person-name-dpb ont:nameont:name CONCAT(person.firstName,person.LastName)CONCAT(person.firstName,person.LastName) person-cb

datatype property column transformation domain concept bridge

Page 20: Ontology-based Cooperation of Information Systems

15/03/2010 20

DOML Language

Advantages rich and powerfull

abstract description of DB schema conditions and transformations 1-1, 1-m, m-1 and m-m mappings

portable and extendable – based on RDF

Drawbacks difficult to edit can not directly be exploited in query translation

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

Page 21: Ontology-based Cooperation of Information Systems

15/03/2010 21

Database-to-Ontology Mapping Mapping Specification

Mapping Process

Query Translation

XML-to-Ontology Mapping Mapping Specification

Mapping Process

Query Translation

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

Page 22: Ontology-based Cooperation of Information Systems

15/03/2010 22

Mapping Process

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

OntologyDatabase

Mapping Document

MetadataMetadata RulesRules

TablesColumnsPrimary Keys...

ConceptsDatatype PropertiesObject Properties...

Page 23: Ontology-based Cooperation of Information Systems

15/03/2010 23

Particular Table Cases

Identification of the different particular table cases Ontology components are created according to these cases

PK1

...

T1

PFK1

PFK2

T

PK2

...

T2

PK1

...

T1

PFK1

...

T

...

...

TCase 3

Case 1

Case 2

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

Primary key Foreign key Integrity Constraint

m-m relationship

1-1 relationship

other tables

Page 24: Ontology-based Cooperation of Information Systems

15/03/2010 24

Example DB Schema

studentId

diplomaId

studentNumber

Student

diplomaId

diplomaName

Diploma

moduleId

diplomaId

moduleName

Module

studentId

sessionId

Presence

sessionId

moduleId

lecturerId

Session

time

hallId

lecturerId

room

Lecturer

hallId

building

hallName

Hall

personId

lastName

firstName

PersonCase 1 (m-m relationship)Case 2 (1-1 relationship)Case 3 (others)

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

Primary key

Foreign key

Integrity Constraint

Page 25: Ontology-based Cooperation of Information Systems

15/03/2010 25

Rules for Ontology Generation

...

...

T

C

case 3

PFK1

...

T

PK1

...

T1

C C1case 2

PK1

...

T1

PFK1

PFK2

T

PK2

...

T2

op2

op1

C1 C2

...

NK

T

dp

C

...

FK

T

PK1

...

T1op

C C1

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

Object property

subClassOf Class

Datatype property

Primary key Foreign key

Integrity Constraint

Database component Ontology component

Page 26: Ontology-based Cooperation of Information Systems

15/03/2010 26

presence-session

presence-student

module-diploma

session-lecturer

Person

Object property

subClassOf

Class

Datatype property

Hall

StudentLecturer

DiplomaModule

Session

firstName

lastName

room

hallNamemoduleName diplomaName

studentNumbertime

student-diplomasession-modulesession-hall

building

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

Primary key

Foreign key

Integrity Constraint

personId

lastName

firstName

Person

sessionId

moduleId

lecturerId

Session

time

hallId

hallId

building

hallName

Hall

diplomaId

studentNumber

Student

studentId

lecturerId

room

Lecturer

moduleId

diplomaId

moduleName

Module

diplomaId

diplomaName

Diploma

studentId

sessionId

Presence

Database Schema

Generated Ontology

Page 27: Ontology-based Cooperation of Information Systems

15/03/2010 27

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

Generated Mappings using Associations with SQL Statements

Concept Associations

Datatype Property Associations

Object Property Associations

SELECT person.personId AS DOM FROM personPersonPerson

SELECT lecturer.lecturerId AS DOM FROM lecturer, person WHERE lecturer.lecturerId = person.personId

StudentStudent

SELECT student.studentId AS DOM FROM student, person WHERE student.studentId = person.personId

LecturerLecturer

SELECT person.personId AS DOM, person.FirstName AS RNG FROM person

firstNamefirstName

SELECT student.studentId AS DOM, student.studentNumber AS RNG FROM student

studentNumberstudentNumber

student.diplomastudent.diploma

session.lecturersession.lecturer

SELECT student.studentId AS DOM, diploma.diplomaId AS RNG FROM student, diploma WHERE student.diplomaID = diploma.diplomaId

SELECT session.sessionId AS DOM, lecturer.lecturerId AS RNG FROM session, lecturer WHERE session.lecturerId = lecturer.lecturerId

Page 28: Ontology-based Cooperation of Information Systems

15/03/2010 28

student-diploma-opb

session-lecturer-opb

person-cb ont:Personont:Person personperson

student-cb ont:Studentont:Student studentstudent

lecturer-cb ont:Lectureront:Lecturer lecturerlecturer

person-firstName-dpb ont:firstNameont:firstName person.firstNameperson.firstName person-cb

student-studentNumber-dpb ont:studentNumberont:studentNumber student.studentNumberstudent.studentNumber student-cb

ont:student.diplomaont:student.diploma

session.lecturerId = lecturer.lecturerIdsession.lecturerId = lecturer.lecturerId

student-cb diploma-cb

ont:session.lectureront:session.lecturer

student.diplomaID = diploma.diplomaIdstudent.diplomaID = diploma.diplomaId

session-cb lecturer-cb

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

Generated Mappings using DOML language

Concept Bridges

Datatype Property Bridges

Object Property Bridges

datatype property column domain concept bridge

concept table

object property

join

domain concept bridge range concept bridge

Page 29: Ontology-based Cooperation of Information Systems

15/03/2010 29

Database-to-Ontology Mapping Mapping Specification

Mapping Process

Query Translation

XML-to-Ontology Mapping Mapping Specification

Mapping Process

Query Translation

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

Page 30: Ontology-based Cooperation of Information Systems

15/03/2010 30

Query Processing

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

sub-query

local query Local Ontology

Data Provider

rewrite

translate

SQL results

SPARQL results

reformulate

solve

SQL query

Querying Web Service

Data Source to Local Ontology

Mappings

Local Ontology to Global Ontology

Mappings

Page 31: Ontology-based Cooperation of Information Systems

15/03/2010 31

SPARQL-to-SQL Query Translation

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

SPARQLquery

SQLquery

Ontology Database

Mapping Document

Translation

Associations with SQL Statements

Associations with SQL Statements DOML LanguageDOML Language

Page 32: Ontology-based Cooperation of Information Systems

15/03/2010 32

Database-to-Ontology Mapping Mapping Specification

Mapping Process

Query Translation

XML-to-Ontology Mapping Mapping Specification

Mapping Process

Query Translation

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

Associations with SQL Statements DOML Language

Page 33: Ontology-based Cooperation of Information Systems

15/03/2010 33

SPARQL-to-SQL Translation using Associations with SQL Statements

Mapping document

SELECTvariables

SPARQLquery

Concept Associations

Property Associations

Build

SELECT FROM WHERE

Simplification

SQLstatements

SQL query

SQL results

Formulation

SPARQLquery results XML format

Mapping Parsing Query Parsing

BasicGraphPattern

FILTERs

Translation

simplified SQL query

1

2

3

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

Page 34: Ontology-based Cooperation of Information Systems

15/03/2010 34

SPARQL-to-SQL Translation using Associations with SQL Statements

presence-session

presence-student

module-diploma

session-lecturer

Person

Hall

StudentLecturer

DiplomaModule

Session

firstName

lastName

room

hallNamemoduleName diplomaName

studentNumbertime

student-diplomasession-modulesession-hall

building

SELECT ?modName

WHERE {

?mod ont:moduleName ?modName.

ont:module-diploma ?dip.

?dip ont:diplomaName ?dipName.

FILTER(?dipName = "BDIA")

}

SPARQL query

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

Example

Ontology

Page 35: Ontology-based Cooperation of Information Systems

15/03/2010 35

SPARQL-to-SQL Translation using Associations with SQL Statements

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

SELECT S1.RNG AS modNameFROM ( SELECT Module.moduleId AS DOM, Module.moduleName AS RNG FROM Module) AS S1, ( SELECT Module.moduleId AS DOM, Diploma.diplomaId AS RNG FROM Module, Diploma WHERE Module.diplomaId = Diploma.diplomaId) AS S2, ( SELECT Diploma.diplomaId AS DOM, Diploma.diplomaName AS RNG FROM Diploma) AS S3WHERE S1.DOM = S2.DOMAND S2.RNG = S3.DOMAND S3.RNG = "BDIA"

S1.RNG AS modNameS1.RNG AS modName

S3.RNG = "BDIA"S3.RNG = "BDIA"

S1.DOM = S2.DOMS1.DOM = S2.DOM

S2.RNG = S3.DOMS2.RNG = S3.DOM

SELECT

SQL

AS S1

AS S2

AS S3

FROM

WHERE

SELECT Module.moduleId AS DOM, Module.moduleName AS RNG FROM Module

SELECT Module.moduleId AS DOM, Module.moduleName AS RNG FROM Module

SELECT Module.moduleId AS DOM, Diploma.diplomaId AS RNG FROM Module, Diploma WHERE Module.diplomaId = Diploma.diplomaId

SELECT Module.moduleId AS DOM, Diploma.diplomaId AS RNG FROM Module, Diploma WHERE Module.diplomaId = Diploma.diplomaId

SELECT Diploma.diplomaId AS DOM, Diploma.diplomaName AS RNG FROM Diploma

SELECT Diploma.diplomaId AS DOM, Diploma.diplomaName AS RNG FROM Diploma

Page 36: Ontology-based Cooperation of Information Systems

15/03/2010 36

SPARQL-to-SQL Translation using Associations with SQL Statements

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

Generated SQL query

Simplified SQL query

SELECT S1.RNG AS modName

FROM (

SELECT Module.moduleId AS DOM,

Module.moduleName AS RNG

FROM Module

) AS S1, (

SELECT Module.moduleId AS DOM,

Diploma.diplomaId AS RNG

FROM Module, Diploma

WHERE Module.diplomaId = Diploma.diplomaId

) AS S2, (

SELECT Diploma.diplomaId AS DOM,

Diploma.diplomaName AS RNG

FROM Diploma

) AS S3

WHERE S1.DOM = S2.DOM

AND S2.RNG = S3.DOM

AND S3.RNG = "BDIA"

SELECT Module.moduleName AS modName

FROM Module, Diploma

WHERE Module.diplomaId = Diploma.diplomaId

AND Diploma.diplomaName = "BDIA"

Page 37: Ontology-based Cooperation of Information Systems

15/03/2010 37

Database-to-Ontology Mapping Mapping Specification

Mapping Process

Query Translation

XML-to-Ontology Mapping Mapping Specification

Mapping Process

Query Translation

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

Associations with SQL Statements DOML Language

Page 38: Ontology-based Cooperation of Information Systems

15/03/2010 38

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

DOML mapping

document

SQL results

Formulation

Mapping Parsing Query Parsing

FILTERs SELECTvariables

Translation

Concept Bridges

Datatype Property Bridges

Object Property Bridges

Transformations

Conditions

Preprocessing

variable-to- Concept mapping

1 2

3

4

BasicGraphPattern

SPARQL-to-SQL Translation using DOML Language

SPARQLquery

SPARQLquery results XML format

SQL query

Page 39: Ontology-based Cooperation of Information Systems

15/03/2010 39

SPARQL-to-SQL Translation using DOML Language

SELECT ?nameWHERE { ?stud a ont:Student; ont:name ?name; ont:studies-in ?dept. ?dept ont:dept-name ?deptName. FILTER (?deptName = "IEM").}

SPARQL query

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

Example

name

email

year

dept-name

works-for studies-in

salary

Person

Department

Employee Student

Ontology

Page 40: Ontology-based Cooperation of Information Systems

15/03/2010 40

SPARQL-to-SQL Translation using DOML Language

Extract main components of the DOML mapping document

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

1. Mapping Document Parsing

DOMLMapping

Document

Mapping Document Parsing

Concept Bridges

Datatype Property Bridges

Object Property Bridges

Transformations

Conditions

Page 41: Ontology-based Cooperation of Information Systems

15/03/2010 41

SPARQL-to-SQL Translation using DOML Language

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

2. Query Parsing

SELECT variables = { ?name }

FILTERs = { (?deptName = "IEM") }

SELECT ?name

WHERE {

?stud a ont:Student;

ont:name ?name;

ont:studies-in ?dept.

?dept ont:dept-name ?deptName.

FILTER (?deptName = "IEM").

}

SPARQL query

ont:name

?stud

ont:Student ?dept

?deptName

ont:deptName

ont:studies-inrdf:type

?name

BGP

Extract main components of the query: SELECT variables Basic Graph Pattern (BGP) FILTER conditions

Page 42: Ontology-based Cooperation of Information Systems

15/03/2010 42

SPARQL-to-SQL Translation using DOML Language

Compute an auxiliary mapping between variables and concepts Serve to choose suitable mapping bridges

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

3. Preprocessing

SELECT ?name

WHERE {

?stud a ont:Student;

ont:name ?name;

ont:studies-in ?dept.

?dept ont:dept-name ?deptName.

FILTER (?deptName = "IEM").

}

?stud?stud ont:Studentont:Student

?dept?dept ont:Departmentont:Department

conceptvariableSPARQL query

Page 43: Ontology-based Cooperation of Information Systems

15/03/2010 43

SPARQL-to-SQL Translation using DOML Language

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

4. Query Translation – Analysis of Mapping Bridges

SELECT ?name

WHERE {

?stud a ont:Student;

ont:name ?name;

ont:studies-in ?dept.

?dept ont:dept-name ?deptName.

FILTER (?deptName = "IEM").

}

Mapping Bridges

conditionstables join

WHEREFROM

?name?name CONCAT(firstName,lastName)CONCAT(firstName,lastName)

variable to column auxiliary mapping

?deptname?deptname dept.deptNamedept.deptName

Page 44: Ontology-based Cooperation of Information Systems

15/03/2010 44

SPARQL-to-SQL Translation using DOML Language

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

4. Query Translation – SELECT Construction

SELECT ?name

WHERE {

?stud a ont:Student;

ont:name ?name;

ont:studies-in ?dept.

?dept ont:dept-name ?deptName.

FILTER (?deptName = "IEM").

}

?name?name CONCAT(firstName,lastName)CONCAT(firstName,lastName)

variable-to-column auxiliary mapping

SELECT CONCAT(firstName,lastName) AS nameSELECT CONCAT(firstName,lastName) AS name

SELECT

Replace variables by their correspondingcolumns or transformations

Page 45: Ontology-based Cooperation of Information Systems

15/03/2010 45

SPARQL-to-SQL Translation using DOML Language

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

4. Query Translation – FILTER Translation

SELECT ?name

WHERE {

?stud a ont:Student;

ont:name ?name;

ont:studies-in ?dept.

?dept ont:dept-name ?deptName.

FILTER (?deptName = "IEM").

}

dept.deptName = "IEM"dept.deptName = "IEM"

WHERE

Replace variables by their correspondingcolumns or transformations

?deptName?deptName dept.deptNamedept.deptName

variable-to-column auxiliary mapping

Page 46: Ontology-based Cooperation of Information Systems

15/03/2010 46

SPARQL-to-SQL Translation using DOML Language

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

4. Query Translation

person.status="student"person.status="student"personperson

dept.deptName = "IEM"dept.deptName = "IEM"SELECT CONCAT(firstName,lastName) AS nameSELECT CONCAT(firstName,lastName) AS name

deptdept

person.deptId = dept.deptIdperson.deptId = dept.deptId

SELECT CONCAT(person.firstName, person.lastName) AS name

FROM person, dept

WHERE (person.status = 'Student')

AND (person.deptId = department.deptId)

AND (dept.deptName = 'IEM')

SQL query

WHERE

SELECT

FROM

Page 47: Ontology-based Cooperation of Information Systems

15/03/2010 47

<sparql> <head> <variable name="fn"/> <variable name="ln"/> <variable name="dipName"/> </head> <results> <result> <binding name="fn"><literal>Raji</literal></binding> <binding name="ln"><literal>Ghawi</literal></binding> <binding name="dipName"><literal>Master 2 3I</literal></binding> </result> <result> <binding name="fn"><literal>Thibault</literal></binding> <binding name="ln"><literal>Poulain</literal></binding> <binding name="dipName"><literal>Master 2 3I</literal></binding> </result> <result> <binding name="fn"><literal>Guillermo</literal></binding> <binding name="ln"><literal>Gomez</literal></binding> <binding name="dipName"><literal>Master 2 BDIA</literal></binding> </result> </results></sparql>

Result Reformulation

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

fn ln dipName

Raji Ghawi Master 2 3I

Thibault Poulain Master 2 3I

Guillermo Gomez Master 2 BDIA

SQL Results

SPARQL Results (XML format)

Page 48: Ontology-based Cooperation of Information Systems

15/03/2010 48

Database-to-Ontology Mapping Mapping Specification

Mapping Process

Query Translation

XML-to-Ontology Mapping Mapping Specification

Mapping Process

Query Translation

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

Page 49: Ontology-based Cooperation of Information Systems

15/03/2010 49

Database-to-Ontology Mapping Mapping Specification

Mapping Process

Query Translation

XML-to-Ontology Mapping Mapping Specification

Mapping Process

Query Translation

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

Page 50: Ontology-based Cooperation of Information Systems

15/03/2010 50

Similar to DOML language

Semantic bridges relate ontology components to XML nodes (expressed using XPath)

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

XOML Language XML to Ontology Mapping Language

Page 51: Ontology-based Cooperation of Information Systems

15/03/2010 51

Concept bridge relates an ontology concept with an XML node possibly, contains a condition

Datatype property bridge relates a datatype property with an XML node (or a transformation) belongs to concept bridge (domain) possibly, contains a condition

XOML Language

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

student-cb StudentStudent /univ/student/univ/student

concept XML node

student-name-dpb namename student-cb/univ/student/name/text()/univ/student/name/text()

datatype property XML node domain concept bridge

Page 52: Ontology-based Cooperation of Information Systems

15/03/2010 52

Object property bridge contains an object property belongs to a concept bridge (domain) refers to another concept bridge (range) possibly, contains a condition

XOML Language

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

studies-in-opb studies-instudies-in student-cb university-cb

object property domain concept bridge range concept bridge

Page 53: Ontology-based Cooperation of Information Systems

15/03/2010 53

Database-to-Ontology Mapping Mapping Specification

Mapping Process

Query Translation

XML-to-Ontology Mapping Mapping Specification

Mapping Process

Query Translation

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

Page 54: Ontology-based Cooperation of Information Systems

15/03/2010 54

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

XML-to-Ontology Mapping Process

OntologyXML Schema

Mapping Document

XSGXSG RulesRules

TypesElementsAttributes...

ConceptsDatatype PropertiesObject Properties...

XML Schema Graph

Page 55: Ontology-based Cooperation of Information Systems

15/03/2010 55

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

XML Schema Graph (XSG)

PurchaseOrderType

@orderDate

(anonymous)

Address USAddress

@country@weightKg @shipBy

purchaseOrder

item

billTo shipTo

state zipstreet cityname

price productName

shipAndBill

ItemDelivery

Attribute Group

Element Group

Attribute

Complex Type

Element

Type Derivation

Containment

Nodes

Edges

Page 56: Ontology-based Cooperation of Information Systems

15/03/2010 56

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

Rules for Ontology Generation

object property

MIXED

restriction

extention

complex type

element group

attribute group

containment relationship

simple element

attribute

text of mixed complex type

subClassOf

Class

datatype property

XML schema component result ontology component

Page 57: Ontology-based Cooperation of Information Systems

15/03/2010 57

hasItem hasItemDelivery

hasShipTo

hasBillTo

ItemPurchaseOrderType ItemDelivery

USAddress

ShipAndBill

orderDate

name

street

city

country

productName

price

weightKg

shipBy

zip

USstate

Addressobject property

subClassOf

OWL class

datatype property

PurchaseOrderType

@orderDate

(anonymous)

Address USAddress

@country@weightKg @shipBy

purchaseOrder

item

billTo shipTo

state zipstreet cityname

price productName

shipAndBill

ItemDelivery

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

Example

hasShipAndBill

XML Schema Graph

Ontology

Page 58: Ontology-based Cooperation of Information Systems

15/03/2010 58

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

Refinement

Remove invalid mappings Reuse of types and elements within XML schema Use of different representations to denote the same entity

lead to invalid XPaths expressions

Ontology restructuring Humans may not admit automatically genenerated structure of ontology

Page 59: Ontology-based Cooperation of Information Systems

15/03/2010 59

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

Refinement – Use of Different Representations

<shipmentorder orderid="889923"> <orderperson>John Smith</orderperson> <items> <item> <title>Empire Burlesque</title> <quantity>1</quantity> <price>10.90</price> </item> <item> <title>Hide your heart</title> <quantity>1</quantity> <price>9.90</price> </item> <item> <title>Hearts of Fire</title> <quantity>1</quantity> <price>10.50</price> </item> </items> <shipments> <shipment> <date>12-01-2009</date> <item title="Empire Burlesque" /> <item title="Hide your heart" /> </shipment> </shipments></shipmentorder>

(anonymous)

@orderidorderperson

(anonymous)

(anonymous)

(anonymous)

(anonymous)

@title

shipmentorder

items shipments

shipment

date

pricetitle quantity

itemhasItem

Shipments

Item

Items

orderId

orderPerson

date

title

quantity

price

hasShipments

hasItems

hasShipment

Shipment

ShipmentOrder

Example

XSGXML DocumentOntology

Page 60: Ontology-based Cooperation of Information Systems

15/03/2010 60

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

Refinement – Removing of Invalid Mappings

<shipmentorder ...> <items> <item> <title>Empire Burlesque</title> ... </item> ... </items> <shipments> <shipment> <item title="Empire Burlesque" /> ... </shipment> </shipments></shipmentorder>

dpb2 titletitle cb3/shipmentorder/items/item/@title/shipmentorder/items/item/@title

dpb4 titletitle cb3/shipmentorder/items/item/title/text()/shipmentorder/items/item/title/text()

dpb7 titletitle cb6/shipmentorder/shipments/shipment/item/@title/shipmentorder/shipments/shipment/item/@title

dpb9 titletitle cb6/shipmentorder/shipments/shipment/item/title/text()/shipmentorder/shipments/shipment/item/title/text()

Valid Mappings have valid XPaths with respect to XML document

XML Document

Mapping Bridges of « title » property

Page 61: Ontology-based Cooperation of Information Systems

15/03/2010 61

Database-to-Ontology Mapping Mapping Specification

Mapping Process

Query Translation

XML-to-Ontology Mapping Mapping Specification

Mapping Process

Query Translation

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

Page 62: Ontology-based Cooperation of Information Systems

15/03/2010 62

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

SPARQL-to-XQuery Translation

SPARQLquery

XQueryquery

Ontology XML Data Source

Mapping Document

(XOML)

Translation

Page 63: Ontology-based Cooperation of Information Systems

15/03/2010 63

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

SPARQL-to-XQuery Translation

XOML mapping

document

SPARQLquery

XQuery query

SPARQLquery results XML format

Mapping Parsing Query Parsing

FILTERs SELECTvariables

Building XQuery

Concept Bridges

Datatype Property Bridges

Object Property Bridges

Preprocessing

1 2

3

4

BasicGraphPattern

XML Data Source

Suitable Mapping Graph

Page 64: Ontology-based Cooperation of Information Systems

15/03/2010 64

SPARQL-to-XQuery Translation

SELECT ?date ?title

WHERE {

?ship ont:date ?date;

ont:hasItem ?item.

?item ont:title ?title.

}

SPARQL query

Example

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

hasItem

Shipments

Item

Items

orderId

orderPerson

date

title

quantity

price

hasShipments

hasItems

hasShipment

Shipment

ShipmentOrder

Ontology

Page 65: Ontology-based Cooperation of Information Systems

15/03/2010 65

SPARQL-to-XQuery Translation

Extract main components of the XOML mapping document

1. Mapping Document Parsing

Mapping Document Parsing

Concept Bridges

Datatype Property Bridges

Object Property Bridges

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

XOML mapping

document

Page 66: Ontology-based Cooperation of Information Systems

15/03/2010 66

SPARQL-to-XQuery Translation

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

2. Query Parsing

SELECT variables = { ?date, ?title }

FILTERs = { }

Extract main components of the query: SELECT variables Basic Graph Pattern (BGP) FILTER conditions

SELECT ?date ?title

WHERE {

?ship ont:date ?date;

ont:hasItem ?item.

?item ont:title ?title.

}

SPARQL query

?ship

?date ?item

?title

ont:title

ont:date ont:hasItem

BGP

Page 67: Ontology-based Cooperation of Information Systems

15/03/2010 67

SPARQL-to-XQuery Translation

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

3. Preprocessing

?ship ~ /shipmentorder/shipments/shipment

?date ~ /shipmentorder/shipments/shipment/date/text()

?item ~ /shipmentorder/shipments/shipment/item

?title ~ /shipmentorder/shipments/shipment/item/@title

Suitable Mapping Graph

Page 68: Ontology-based Cooperation of Information Systems

15/03/2010 68

<sparql>

<head>

<variable name="..." />

...

</head>

<results>

{

for ...

let ...

where ...

return

<result>

<binding name="...">{ ... }</binding>

...

</result>

}

</results>

</sparql>

SPARQL-to-XQuery Translation

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

4. Building Target XQuery

XQuery Template

Page 69: Ontology-based Cooperation of Information Systems

15/03/2010 69

SPARQL-to-XQuery Translation

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

4. Building Target XQuery

?ship ~ /shipmentorder/shipments/shipment

?date ~ /shipmentorder/shipments/shipment/date/text()

?item ~ /shipmentorder/shipments/shipment/item

?title ~ /shipmentorder/shipments/shipment/item/@title

for $ship in /shipmentorder/shipments/shipment

let $date := /shipmentorder/shipments/shipment/date/text()

for $item in /shipmentorder/shipments/shipment/item

let $title := /shipmentorder/shipments/shipment/item/@title

non-leaf vertex for statement

leaf vertex let statement

Page 70: Ontology-based Cooperation of Information Systems

15/03/2010 70

SPARQL-to-XQuery Translation

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

4. Building Target XQuery

Abbreviation of absolute XPath expressions into relative expressionsReplace common parts of XPaths by corresponding variables

for $ship in /shipmentorder/shipments/shipment

let $date := /shipmentorder/shipments/shipment/date/text()

for $item in /shipmentorder/shipments/shipment/item

let $title := /shipmentorder/shipments/shipment/item/@title

for $ship in /shipmentorder/shipments/shipment

let $date := $ship/date/text()

for $item in $ship/item

let $title := $item/@title

Absolute XPaths

Relative XPaths

Page 71: Ontology-based Cooperation of Information Systems

15/03/2010 71

SPARQL-to-XQuery Translation

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

4. Building Target XQuery

<sparql>

<head>

<variable name="date" />

<variable name="title" />

</head>

<results>

{

for $ship in /shiporder/ships/ship

let $date := $ship/date/text()

for $item in $ship/item

let $title := $item/@title

return

<result>

<binding name="date">{$date}</binding>

<binding name="title">{fn:data($title)}</binding>

</result>

}

</results>

</sparql>

XQuery

Page 72: Ontology-based Cooperation of Information Systems

15/03/2010 72

SPARQL-to-XQuery Translation

Database-to-Ontology Mapping XML-to-Ontology Mapping

Mapping Specification Mapping Process Query Translation

4. Building Target XQuery

<sparql>

<head>

<variable name="date"/>

<variable name="title"/>

</head>

<results>

<result>

<binding name="date">12-01-2009</binding>

<binding name="title">Empire Burlesque</binding>

</result>

<result>

<binding name="date">12-01-2009</binding>

<binding name="title">Hide your heart</binding>

</result>

</results>

</sparql>

SPARQL Results (XML format)

Page 73: Ontology-based Cooperation of Information Systems

15/03/2010 73

Implementation

DB2OWL Tool generate ontology from DB map a DB to existing ontology translate SPARQL to SQL

Oracle, MySQL Associations with SQL, DOML language

X2OWL Tool generate ontology from XML data source translate SPARQL to XQuery map XML to existing ontology

Jena JDBC Zql

JDOM

XSOM

JUNG NUX

Java programming language

Page 74: Ontology-based Cooperation of Information Systems

15/03/2010 74

Conclusion and Contributions

OWSCIS: Ontology-based framework for cooperation of information sources

Mapping of information sources to local ontologies Mapping Specification

Associations with SQL, DOML language XOML language

Ontology Construction from Database from XML

Query Translation SPARQL-to-SQL SPARQL-to-XQuery

Page 75: Ontology-based Cooperation of Information Systems

15/03/2010 75

Publications Building Ontologies from XML Data Sources, Raji Ghawi and Nadine Cullot. 1st

International Workshop on Modelling and Visualization of XML and Semantic Web Data -

MoViX '09, held in conjunction with DEXA 2009, Linz, Austria, September 2009.

Building Ontologies from Multiple Information Sources, Raji Ghawi and Nadine Cullot.

15th conference on Information and Software Technologies (IT2009), Kaunas, Lithuania,

April 2009.

OWSCIS: Ontology and Web Service based Cooperation of Information Sources, Raji

Ghawi, Thibault Poulain, Guillermo Gomez and Nadine Cullot. 3rd International Conference

on Signal-Image Technology & Internet-based Systems (SITIS' 2007), Shanghai, China,

December 2007.

Database-to-Ontology Mapping Generation for Semantic Interoperability, Raji Ghawi

and Nadine Cullot. Third International Workshop on Database Interoperability (InterDB

2007), held in conjunction with VLDB 2007, Vienna, Austria, 2007.

DB2OWL: A Tool for Automatic Database-to-Ontology Mapping, Nadine Cullot, Raji

Ghawi and Kokou Yétongnon. In Proceedings of the 15th Italian Symposium on Advanced

Database Systems (SEBD 2007), Torre Canne di Fasano (BR), Italy, pp. 491-494, June 2007.

Page 76: Ontology-based Cooperation of Information Systems

15/03/2010 76

Future Works

Make use of OWSCIS framework in real-world case study

Implementation Mapping XML data sources to existing ontologies Ontology creation from multiple information sources Full support of SPARQL in query translation

Page 77: Ontology-based Cooperation of Information Systems

Thank you

Merci