The document discusses mapping analysis tasks in ontology-based data access (OBDA). It defines key concepts like ontology, mappings, and OBDA specification. The main tasks of mapping analysis are consistency, subsumption, and redundancy detection. Consistency checks if the head or body of a mapping assertion is unsatisfiable according to the ontology or source schema. Subsumption identifies mappings that are implied by other mappings. Redundancy finds mappings that can be removed without affecting query answers. The document uses an example OBDA specification and mappings to illustrate these concepts.
Pests of castor_Binomics_Identification_Dr.UPR.pdf
Mapping Analysis Tasks for Ontology-based Data Access
1. Towards Mapping Analysis
in Ontology-based Data Access
Domenico Lembo (1), Jose Mora (1), Riccardo Rosati (1),
Domenico Fabio Savo (1) and Evgenij Thorstensen (2)
(1) lastname@dis.uniroma1.it & (2) evgenit@ifi.uio.no
Athens | September 15, 2014
mora@dis.uniroma1.it Mapping Analysis | Athens | September 15, 2014 1/13
6. ning OBDA mappings is complex
In realistic scenarios:
hundreds of mappings may be needed
individual mappings may be complex (distance from DB to ontology)
resulting mappings may be redundant or inconsistent
Mapping analysis may help to detect anomalous situations
mora@dis.uniroma1.it Mapping Analysis | Introduction Athens | September 15, 2014 4/13
14. nitions
Ontology O
Source schema S
Mapping M= fm1; : : : ;mng
(GAV) Mapping assertion m = bodym(~x; ~y) ! headm(~x)
OBDA speci
15. cation J = hO; S;Mi
Source instance1 D
Retr(p;M;D) fp(t) j hM;Di j= p(t)g; where p is a predicate of O
Models(J ;D) fI j I j= O ^ 8p of O:I j= Retr(p;M;D)g
Mapping active on D 8m 2M:D j= 9~x; ~y 2 D:bodym(~x; ~y)
1we assume D j= S
mora@dis.uniroma1.it Mapping Analysis | De
18. nitions
Ontology O
Source schema S
Mapping M= fm1; : : : ;mng
(GAV) Mapping assertion m = bodym(~x; ~y) ! headm(~x)
OBDA speci
19. cation J = hO; S;Mi
Source instance1 D
Retr(p;M;D) fp(t) j hM;Di j= p(t)g; where p is a predicate of O
Models(J ;D) fI j I j= O ^ 8p of O:I j= Retr(p;M;D)g
Mapping active on D 8m 2M:D j= 9~x; ~y 2 D:bodym(~x; ~y)
1we assume D j= S
mora@dis.uniroma1.it Mapping Analysis | De
22. nitions
Ontology O
Source schema S
Mapping M= fm1; : : : ;mng
(GAV) Mapping assertion m = bodym(~x; ~y) ! headm(~x)
OBDA speci
23. cation J = hO; S;Mi
Source instance1 D
Retr(p;M;D) fp(t) j hM;Di j= p(t)g; where p is a predicate of O
Models(J ;D) fI j I j= O ^ 8p of O:I j= Retr(p;M;D)g
Mapping active on D 8m 2M:D j= 9~x; ~y 2 D:bodym(~x; ~y)
1we assume D j= S
mora@dis.uniroma1.it Mapping Analysis | De
26. nitions
Ontology O
Source schema S
Mapping M= fm1; : : : ;mng
(GAV) Mapping assertion m = bodym(~x; ~y) ! headm(~x)
OBDA speci
27. cation J = hO; S;Mi
Source instance1 D
Retr(p;M;D) fp(t) j hM;Di j= p(t)g; where p is a predicate of O
Models(J ;D) fI j I j= O ^ 8p of O:I j= Retr(p;M;D)g
Mapping active on D 8m 2M:D j= 9~x; ~y 2 D:bodym(~x; ~y)
1we assume D j= S
mora@dis.uniroma1.it Mapping Analysis | De
30. nitions
Ontology O
Source schema S
Mapping M= fm1; : : : ;mng
(GAV) Mapping assertion m = bodym(~x; ~y) ! headm(~x)
OBDA speci
31. cation J = hO; S;Mi
Source instance1 D
Retr(p;M;D) fp(t) j hM;Di j= p(t)g; where p is a predicate of O
Models(J ;D) fI j I j= O ^ 8p of O:I j= Retr(p;M;D)g
Mapping active on D 8m 2M:D j= 9~x; ~y 2 D:bodym(~x; ~y)
1we assume D j= S
mora@dis.uniroma1.it Mapping Analysis | De
34. nitions
Ontology O
Source schema S
Mapping M= fm1; : : : ;mng
(GAV) Mapping assertion m = bodym(~x; ~y) ! headm(~x)
OBDA speci
35. cation J = hO; S;Mi
Source instance1 D
Retr(p;M;D) fp(t) j hM;Di j= p(t)g; where p is a predicate of O
Models(J ;D) fI j I j= O ^ 8p of O:I j= Retr(p;M;D)g
Mapping active on D 8m 2M:D j= 9~x; ~y 2 D:bodym(~x; ~y)
1we assume D j= S
mora@dis.uniroma1.it Mapping Analysis | De
38. nitions
Ontology O
Source schema S
Mapping M= fm1; : : : ;mng
(GAV) Mapping assertion m = bodym(~x; ~y) ! headm(~x)
OBDA speci
39. cation J = hO; S;Mi
Source instance1 D
Retr(p;M;D) fp(t) j hM;Di j= p(t)g; where p is a predicate of O
Models(J ;D) fI j I j= O ^ 8p of O:I j= Retr(p;M;D)g
Mapping active on D 8m 2M:D j= 9~x; ~y 2 D:bodym(~x; ~y)
1we assume D j= S
mora@dis.uniroma1.it Mapping Analysis | De
42. nitions
Ontology O
Source schema S
Mapping M= fm1; : : : ;mng
(GAV) Mapping assertion m = bodym(~x; ~y) ! headm(~x)
OBDA speci
43. cation J = hO; S;Mi
Source instance1 D
Retr(p;M;D) fp(t) j hM;Di j= p(t)g; where p is a predicate of O
Models(J ;D) fI j I j= O ^ 8p of O:I j= Retr(p;M;D)g
Mapping active on D 8m 2M:D j= 9~x; ~y 2 D:bodym(~x; ~y)
1we assume D j= S
mora@dis.uniroma1.it Mapping Analysis | De
46. nitions
Ontology O
Source schema S
Mapping M= fm1; : : : ;mng
(GAV) Mapping assertion m = bodym(~x; ~y) ! headm(~x)
OBDA speci
47. cation J = hO; S;Mi
Source instance1 D
Retr(p;M;D) fp(t) j hM;Di j= p(t)g; where p is a predicate of O
Models(J ;D) fI j I j= O ^ 8p of O:I j= Retr(p;M;D)g
Mapping active on D 8m 2M:D j= 9~x; ~y 2 D:bodym(~x; ~y)
1we assume D j= S
mora@dis.uniroma1.it Mapping Analysis | De
49. Running example
DB Schema
ANM TAB (ANM CODE, NAME, BREED, AREA)
AREA TAB (AREA CODE, SIZE)
Ontology
Lion v Animal
Monkey v Animal
Lion v :Monkey
Animal v 9name
Animal v 9locatedIn
9locatedIn v Area
Area v 9size
Mapping
m1: SELECT ANM CODE AS X, NAME AS Y ! Animal(X) ^ name(X; Y )
FROM ANM TAB
m2: SELECT ANM CODE AS X, AREA AS Y ! Lion(X) ^ locatedIn(X; Y )
FROM ANM TAB WHERE BREED = `Lion'
m3: SELECT ANM CODE AS X, AREA AS Y ! Monkey(X) ^ locatedIn(X; Y )
FROM ANM TAB WHERE BREED = `Monkey'
m4: SELECT ANM CODE AS X, AREA AS Y ! locatedIn(X; Y )
FROM ANM TAB
m5: SELECT AREA CODE AS X, SIZE AS Y ! Area(X) ^ size(X; Y )
FROM AREA TAB
mora@dis.uniroma1.it Mapping Analysis | De
51. Running example
DB Schema
ANM TAB (ANM CODE, NAME, BREED, AREA)
AREA TAB (AREA CODE, SIZE)
Ontology
Lion v Animal
Monkey v Animal
Lion v :Monkey
Animal v 9name
Animal v 9locatedIn
9locatedIn v Area
Area v 9size
Mapping
m1: SELECT ANM CODE AS X, NAME AS Y ! Animal(X) ^ name(X; Y )
FROM ANM TAB
m2: SELECT ANM CODE AS X, AREA AS Y ! Lion(X) ^ locatedIn(X; Y )
FROM ANM TAB WHERE BREED = `Lion'
m3: SELECT ANM CODE AS X, AREA AS Y ! Monkey(X) ^ locatedIn(X; Y )
FROM ANM TAB WHERE BREED = `Monkey'
m4: SELECT ANM CODE AS X, AREA AS Y ! locatedIn(X; Y )
FROM ANM TAB
m5: SELECT AREA CODE AS X, SIZE AS Y ! Area(X) ^ size(X; Y )
FROM AREA TAB
mora@dis.uniroma1.it Mapping Analysis | De
53. Running example
DB Schema
ANM TAB (ANM CODE, NAME, BREED, AREA)
AREA TAB (AREA CODE, SIZE)
Ontology
Lion v Animal
Monkey v Animal
Lion v :Monkey
Animal v 9name
Animal v 9locatedIn
9locatedIn v Area
Area v 9size
Mapping
m1: SELECT ANM CODE AS X, NAME AS Y ! Animal(X) ^ name(X; Y )
FROM ANM TAB
m2: SELECT ANM CODE AS X, AREA AS Y ! Lion(X) ^ locatedIn(X; Y )
FROM ANM TAB WHERE BREED = `Lion'
m3: SELECT ANM CODE AS X, AREA AS Y ! Monkey(X) ^ locatedIn(X; Y )
FROM ANM TAB WHERE BREED = `Monkey'
m4: SELECT ANM CODE AS X, AREA AS Y ! locatedIn(X; Y )
FROM ANM TAB
m5: SELECT AREA CODE AS X, SIZE AS Y ! Area(X) ^ size(X; Y )
FROM AREA TAB
mora@dis.uniroma1.it Mapping Analysis | De
55. Tasks
Three main tasks to consider:
Consistency
Subsumption
Redundancy
mora@dis.uniroma1.it Mapping Analysis | Tasks Athens | September 15, 2014 7/13
56. Consistency
Consistency
head-inconsistency O j= 8~x::headm(~x)
body-inconsistency S j= 8~x; ~y::bodym(~x; ~y)
mapping-inconsistency head-inconsistency _ body-inconsistency
global mapping-inconsistency69D:M active on D ^Models(J ;D)6= ;
Ontology O
Source schema S
Mapping M= fm1; : : : ;mng
(GAV) Mapping assertion m = bodym(~x; ~y) ! headm(~x)
Source instance D
Models(J ;D) fI j I j= O ^ 8p of O:I j= Retr(p;M;D)g
Mapping active on D 8m 2M:D j= 9~x; ~y 2 D:bodym(~x; ~y)
mora@dis.uniroma1.it Mapping Analysis | Tasks Athens | September 15, 2014 8/13
57. Consistency
Consistency
head-inconsistency O j= 8~x::headm(~x)
body-inconsistency S j= 8~x; ~y::bodym(~x; ~y)
mapping-inconsistency head-inconsistency _ body-inconsistency
For example consider the following mapping assertion:
global mapping-inconsistency69D:M active on D ^Models(J ;D)6= ;
m: SELECT ANM CODE AS X ! Lion(X) ^ Monkey(X)
FROM ANM TAB
Ontology O
Source schema S
m is head-inconsistent.
Mapping M= fm1; : : : ;mng
(GAV) Mapping assertion Remember:O m = bodyj= Lion m(~x; v ~y) :Monkey.
! headm(~x)
Source instance D
Models(J ;D) fI j I j= O ^ 8p of O:I j= Retr(p;M;D)g
Mapping active on D 8m 2M:D j= 9~x; ~y 2 D:bodym(~x; ~y)
mora@dis.uniroma1.it Mapping Analysis | Tasks Athens | September 15, 2014 8/13
58. Consistency
Consistency
head-inconsistency O j= 8~x::headm(~x)
body-inconsistency S j= 8~x; ~y::bodym(~x; ~y)
mapping-inconsistency head-inconsistency _ body-inconsistency
global mapping-inconsistency69D:M active on D ^Models(J ;D)6= ;
Ontology O
Source schema S
Mapping M= fm1; : : : ;mng
(GAV) Mapping assertion m = bodym(~x; ~y) ! headm(~x)
Source instance D
Models(J ;D) fI j I j= O ^ 8p of O:I j= Retr(p;M;D)g
Mapping active on D 8m 2M:D j= 9~x; ~y 2 D:bodym(~x; ~y)
mora@dis.uniroma1.it Mapping Analysis | Tasks Athens | September 15, 2014 8/13
59. Consistency
Consistency
head-inconsistency O j= 8~x::headm(~x)
body-inconsistency S j= 8~x; ~y::bodym(~x; ~y)
mapping-inconsistency head-inconsistency _ body-inconsistency
m: SELECT ANM CODE AS X ! Animal(X)
global mapping-inconsistency69D:M active on D ^Models(J ;D)6= ;
FROM ANM TAB
WHERE BREED = `Lion' AND
BREED = `Monkey'
Ontology O
Source schema S
For every tuple in ANM TAB the attribute BREED will assume a single value.
Mapping M= fm1; : : : ;mng
(GAV) Mapping assertion m = bodym(~x; ~y) ! headm(~x)
Therefore, m is body-inconsistent.
Source instance D
Models(J ;D) fI j I j= O ^ 8p of O:I j= Retr(p;M;D)g
Mapping active on D 8m 2M:D j= 9~x; ~y 2 D:bodym(~x; ~y)
mora@dis.uniroma1.it Mapping Analysis | Tasks Athens | September 15, 2014 8/13
60. Consistency
Consistency
head-inconsistency O j= 8~x::headm(~x)
body-inconsistency S j= 8~x; ~y::bodym(~x; ~y)
mapping-inconsistency head-inconsistency _ body-inconsistency
global mapping-inconsistency69D:M active on D ^Models(J ;D)6= ;
Ontology O
Source schema S
Mapping M= fm1; : : : ;mng
(GAV) Mapping assertion m = bodym(~x; ~y) ! headm(~x)
Source instance D
Models(J ;D) fI j I j= O ^ 8p of O:I j= Retr(p;M;D)g
Mapping active on D 8m 2M:D j= 9~x; ~y 2 D:bodym(~x; ~y)
mora@dis.uniroma1.it Mapping Analysis | Tasks Athens | September 15, 2014 8/13
61. Consistency
Consistency
head-inconsistency O j= 8~x::headm(~x)
body-inconsistency S j= 8~x; ~y::bodym(~x; ~y)
mapping-inconsistency head-inconsistency _ body-inconsistency
global mapping-inconsistency69D:M active on D ^Models(J ;D)6= ;
Ontology O
Source schema S
Mapping M= fm1; : : : ;mng
(GAV) Mapping assertion m = bodym(~x; ~y) ! headm(~x)
Source instance D
Models(J ;D) fI j I j= O ^ 8p of O:I j= Retr(p;M;D)g
Mapping active on D 8m 2M:D j= 9~x; ~y 2 D:bodym(~x; ~y)
mora@dis.uniroma1.it Mapping Analysis | Tasks Athens | September 15, 2014 8/13
62. Consistency
Consistency
head-inconsistency O j= 8~x::headm(~x)
body-inconsistency S j= 8~x; ~y::bodym(~x; ~y)
mapping-inconsistency head-inconsistency _ body-inconsistency
global mapping-inconsistency69D:M active on D ^Models(J ;D)6= ;
m1: SELECT ANM CODE AS X FROM ANM TAB ! Lion(X)
m2: SELECT ANM CODE AS X FROM ANM TAB ! Monkey(X)
Ontology O
Remember: Lion v :Monkey
Source schema S
Mapping M= fm1; : : : ;mng
Global inconsistency. Separately, m1 and m2 are not necessarily problematic.
(GAV) Mapping assertion m = bodym(~x; ~y) ! headm(~x)
Source instance D
Models(J ;D) fI j I j= O ^ 8p of O:I j= Retr(p;M;D)g
Mapping active on D 8m 2M:D j= 9~x; ~y 2 D:bodym(~x; ~y)
mora@dis.uniroma1.it Mapping Analysis | Tasks Athens | September 15, 2014 8/13
63. Subsumption
Subsumption
m1 body-subsumes m2 S ` 8~x:bodym2(~x2) ! (bodym1(~x1)) (2)
m1 head-subsumes m2 O ` 8~x:(headm2(~x2) ! (headm1(~x1)))
extensional (predicate) subsumption Retr(p1;M;D) Retr(p2;M;D)
extensional (predicate) emptiness Retr(p;M;D) = ;
Ontology O
Source schema S
Mapping M= fm1; : : : ;mng
(GAV) Mapping assertion m = bodym(~x; ~y) ! headm(~x)
Source instance D
Retr(p;M;D) fp(t) j hM;Di j= p(t)g; (p pred. of O)
2where is the most general uni
65. Subsumption
Subsumption
m1 body-subsumes m2 S ` 8~x:bodym2(~x2) ! (bodym1(~x1)) (2)
m1 head-subsumes m2 O ` 8~x:(headm2(~x2) ! (headm1(~x1)))
extensional (predicate) subsumption Retr(p1;M;D) Retr(p2;M;D)
m1: SELECT AREA CODE AS X, SIZE AS Y ! size(X; Y )
extensional (predicate) emptiness Retr(p;M;D) = ;
m2: SELECT AREA CODE AS X, SIZE AS Y ! Area(X) ^ size(X; Y )
Ontology O
FROM AREA TAB
FROM AREA TAB WHERE SIZE 10
Source schema S
Mapping M= fm1; : : : ;mng
m1 body-subsumes m2
(GAV) Mapping assertion m = bodym(~x; ~y) ! headm(~x)
Source instance D
Retr(p;M;D) fp(t) j hM;Di j= p(t)g; (p pred. of O)
2where is the most general uni
69. Subsumption
Subsumption
m1 body-subsumes m2 S ` 8~x:bodym2(~x2) ! (bodym1(~x1)) (2)
m1 head-subsumes m2 O ` 8~x:(headm2(~x2) ! (headm1(~x1)))
extensional (predicate) subsumption Retr(p1;M;D) Retr(p2;M;D)
extensional (predicate) emptiness Retr(p;M;D) = ;
m3: SELECT ANM CODE AS X ! Animal(X) ^ name(X; Y )
FROM ANM TAB WHERE BREED = `Monkey'
m4: SELECT ANM CODE AS X, NAME AS Y ! Lion(X) ^ name(X; Y )
Ontology O
FROM ANM TAB WHERE BREED = `Lion'
Source schema S
Mapping M= fm1; : : : ;mng
m3 head-subsumes m4.
(GAV) Mapping assertion m = bodym(~x; ~y) ! headm(~x)
Source instance D
Retr(p;M;D) fp(t) j hM;Di j= p(t)g; (p pred. of O)
2where is the most general uni
75. Redundancy
Redundancy
m2 redundant for m1 8D:Models(hO; S; fm1gi;D) =
Models(hO; S; fm1;m2gi;D)
global mapping redundancy 8D:Models(hO; S;M1i;D) =
Models(hO; S;M1 [M2gi;D)
Ontology O
Source schema S
Mapping M= fm1; : : : ;mng
(GAV) Mapping assertion m = bodym(~x; ~y) ! headm(~x)
Source instance D
Models(J ;D) fI j I j= O ^ 8p of O:I j= Retr(p;M;D)g
mora@dis.uniroma1.it Mapping Analysis | Tasks Athens | September 15, 2014 10/13
76. Redundancy
Redundancy
m2 redundant for m1 8D:Models(hO; S; fm1gi;D) =
Models(hO; S; fm1;m2gi;D)
global mapping redundancy 8D:Models(hO; S;M1i;D) =
m1: SELECT ANM CODE AS X, NAME AS Y ! name(X; Y )
Models(hO; S;M1 [M2gi;D)
FROM ANM TAB WHERE BREED = `Monkey'
m2: SELECT ANM CODE AS X, NAME AS Y ! Animal(X) ^ name(X; Y )
FROM ANM TAB
Ontology O
Source schema S
m1 is redundant for m2.
Mapping M= fm1; : : : ;mng
(, m2 body-subsumes m1 and m1 head-subsumes m2.)
(GAV) Mapping assertion m = bodym(~x; ~y) ! headm(~x)
Source instance D
Models(J ;D) fI j I j= O ^ 8p of O:I j= Retr(p;M;D)g
mora@dis.uniroma1.it Mapping Analysis | Tasks Athens | September 15, 2014 10/13
77. Redundancy
Redundancy
m2 redundant for m1 8D:Models(hO; S; fm1gi;D) =
Models(hO; S; fm1;m2gi;D)
global mapping redundancy 8D:Models(hO; S;M1i;D) =
Models(hO; S;M1 [M2gi;D)
Ontology O
Source schema S
Mapping M= fm1; : : : ;mng
(GAV) Mapping assertion m = bodym(~x; ~y) ! headm(~x)
Source instance D
Models(J ;D) fI j I j= O ^ 8p of O:I j= Retr(p;M;D)g
mora@dis.uniroma1.it Mapping Analysis | Tasks Athens | September 15, 2014 10/13
78. Redundancy
Redundancy
m2 redundant for m1 8D:Models(hO; S; fm1gi;D) =
Models(hO; S; fm1;m2gi;D)
global mapping redundancy 8D:Models(hO; S;M1i;D) =
Models(hO; S;M1 [M2gi;D)
m1: Q(X) ! A(X)
m2: Q(X) ! B(X)
m3: Q(X) ! A(X) ^ B(X)
Ontology O
Source schema S
M0 = fm3g is globally redundant for M= fm1;m2g.
Mapping M= fm1; : : : ;mng
m3 is not redundant for any particular mapping assertion in M.
(GAV) Mapping assertion m = bodym(~x; ~y) ! headm(~x)
Source instance D
Models(J ;D) fI j I j= O ^ 8p of O:I j= Retr(p;M;D)g
mora@dis.uniroma1.it Mapping Analysis | Tasks Athens | September 15, 2014 10/13
79. Decidability results
First-order to DCQ LS 2 UCQ-dec, arbitrary LS, LS 2 UCQ-dec,
mappings arbitrary LO LO 2 GAE-dec LO 2 GAE-dec
head-subsumption/inconsistency U D D
body-subsumption/inconsistency U U U
assertion redundancy/inconsistency U U U
extensional subsumption/emptiness U U U
global inconsistency U U U
UCQ Union of conjunctive queries
DCQ Distinguished conjunctive query
LS and LO Language for (resp.) the schema S and for the ontology O
UCQ-dec FO languages for which UCQ containment is decidable
GAE-dec FO languages for which entailment of ground atoms is decidable
mora@dis.uniroma1.it Mapping Analysis | Results Athens | September 15, 2014 11/13
80. Decidability results
Conjunctive query to DCQ LS 2 UCQ-dec, arbitrary LS, LS 2 UCQ-dec,
mappings arbitrary LO LO 2 GAE-dec LO 2 GAE-dec
head-subsumption/inconsistency U D D
body-subsumption/inconsistency D U D
assertion redundancy/inconsistency U U D
extensional subsumption/emptiness D U D
global inconsistency (S = ;) U D D
UCQ Union of conjunctive queries
DCQ Distinguished conjunctive query
LS and LO Language for (resp.) the schema S and for the ontology O
UCQ-dec FO languages for which UCQ containment is decidable
GAE-dec FO languages for which entailment of ground atoms is decidable
mora@dis.uniroma1.it Mapping Analysis | Results Athens | September 15, 2014 11/13
82. cations
2 Ensuring these properties is not easy (manually)
3 In some cases an automatic veri
83. cation is possible (decidable)
4 Some preliminary results for LAV mappings (details in the paper)
5 Computational complexity is pending
mora@dis.uniroma1.it Mapping Analysis | Conclusions Athens | September 15, 2014 12/13
84. Towards Mapping Analysis
in Ontology-based Data Access
Domenico Lembo (1), Jose Mora (1), Riccardo Rosati (1),
Domenico Fabio Savo (1) and Evgenij Thorstensen (2)
(1) lastname@dis.uniroma1.it (2) evgenit@ifi.uio.no
Athens | September 15, 2014
mora@dis.uniroma1.it Mapping Analysis | Conclusions Athens | September 15, 2014 13/13