Ontology-based Cooperation of Information Systems Contributions to Database-to- Ontology Mapping and XML-to- Ontology Mapping Raji GHAWI 15/03/2010
Jan 15, 2015
Ontology-based Cooperation of Information Systems
Contributions to Database-to-Ontology Mapping and XML-to-Ontology Mapping
Raji GHAWI
15/03/2010
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
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
15/03/2010 4
Introduction
Heterogeneity structural
syntactic
system
semantic
scaling & units naming
language model
schema
representation
hardware
operating system
synonymy homonymy
15/03/2010 5
State of the Art - Approaches
Semantic Approaches
FederationFederation MediationMediation
Source 1 Source 2 Source 1 Source 2
Mediator
Wrapper
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
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, …
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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...
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
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
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
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
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
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
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
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
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
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
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
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
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
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"
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
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
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
year
dept-name
works-for studies-in
salary
Person
Department
Employee Student
Ontology
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
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
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
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
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
…
…
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
…
…
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
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)
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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)
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
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
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.
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
Thank you
Merci