182
Paola Podest` a, Barbara Catania, and Alberto Belussi
8.7.2 Query Processing in GIS Mediation Architectures
In a mediation architecture, the mediator exploits the consistency concepts introduced in Sect. 8.6 to compute the most similar topological/cardinal relations to be
used in order to rewrite the global user query into the local source queries.
Consider the query Q 2 introduced in Sect. 8.3:
Q 2 = {r|r is a road, r Overlap T 1 and r MBB:N:NE T 1 }.
Suppose that maps M 1 , M 2 , and M 3 represent the local sources over which query
Q 2 has to be executed and that, at the global level, features are represented with the
maximum dimension by which they appear in the local sources. In our example, this
means that, at the global level, roads, towns, and pollution areas are represented as
regions.
If no rewriting is performed, from the local sources we get the following results:
(i) from M 1 , roads R 5 ; (ii) from M 2 and M 3 the empty set, since Overlap is not
defined between lines and regions and between points and lines, even if roads R 5
and R 6 well approximate the specified condition. We notice that the cardinal directional relation MBB:N:NE is, however, defined in all the three maps, since no point
is considered as the target object.
Under this scenario, a reasonable approach for query execution at the local level
would be that of rewriting the global predicate into a local predicate which is distbased consistent with the global one. Notice that for the multi-tile cardinal directional
predicate, as the target object is not a point, no rewriting is required. For topological
predicates, we consider the set of their dist-based consistent predicates, according to
the results presented in [2]. Thus, query Q 1 is rewritten as follows:
• Map M 1 : Q
1
1 = {r|r is a road, r Overlap T 1 and r MBB:N:NE T 1 }, the result set
is {R 5 }.
• Map M 2 : Q
2
1 = {r|r is a road, r Cross T 1 and r MBB:N:NE T 1 }, the result set is
{R 5 , R 6 }.
• Map M 3 : Q
3
1 = {r|r is a road, r θ T 1 , θ ∈ {Dis joint, T ouch, Contain}, and
r MBB:N:NE T 1 }, the result set is {R 5 , R 6 }.
As a second example, suppose the user is interested in the towns that are
Northwest–North of town T 1 . This query can be specified as follows: Q 2 =
{t|t is a town and t NW:N T 1 }. If no rewriting is performed, from the local sources
we get the following results: (i) from M 1 , town T 2 ; (ii) from M 2 and M 3 , the empty
set as, in map M 2 , no object satisfies the NW:N predicate whereas, in map M 3 , as
discussed in Sect. 8.6, the multi-tile predicate is not defined over pairs of points.
However, towns T 4 and T 5 in map M 3 well approximate the required conditions.
According to Proposition 8.3, the dist-based consistent rewriting will generate the
following local queries:
• Map M 1 : {t|t is a town, t NW:N T 1 }, the result is {T 2 }.
• Map M 2 : {t|t is a town, t NW:N T 1 }, the result set is empty.
• Map M 3 : {t|t is a town, t ψ T 1 , ψ ∈ {NW, N }}, the result set is {T 4 , T 5 }.
Paola Podest` a, Barbara Catania, and Alberto Belussi
8.7.2 Query Processing in GIS Mediation Architectures
In a mediation architecture, the mediator exploits the consistency concepts introduced in Sect. 8.6 to compute the most similar topological/cardinal relations to be
used in order to rewrite the global user query into the local source queries.
Consider the query Q 2 introduced in Sect. 8.3:
Q 2 = {r|r is a road, r Overlap T 1 and r MBB:N:NE T 1 }.
Suppose that maps M 1 , M 2 , and M 3 represent the local sources over which query
Q 2 has to be executed and that, at the global level, features are represented with the
maximum dimension by which they appear in the local sources. In our example, this
means that, at the global level, roads, towns, and pollution areas are represented as
regions.
If no rewriting is performed, from the local sources we get the following results:
(i) from M 1 , roads R 5 ; (ii) from M 2 and M 3 the empty set, since Overlap is not
defined between lines and regions and between points and lines, even if roads R 5
and R 6 well approximate the specified condition. We notice that the cardinal directional relation MBB:N:NE is, however, defined in all the three maps, since no point
is considered as the target object.
Under this scenario, a reasonable approach for query execution at the local level
would be that of rewriting the global predicate into a local predicate which is distbased consistent with the global one. Notice that for the multi-tile cardinal directional
predicate, as the target object is not a point, no rewriting is required. For topological
predicates, we consider the set of their dist-based consistent predicates, according to
the results presented in [2]. Thus, query Q 1 is rewritten as follows:
• Map M 1 : Q
1
1 = {r|r is a road, r Overlap T 1 and r MBB:N:NE T 1 }, the result set
is {R 5 }.
• Map M 2 : Q
2
1 = {r|r is a road, r Cross T 1 and r MBB:N:NE T 1 }, the result set is
{R 5 , R 6 }.
• Map M 3 : Q
3
1 = {r|r is a road, r θ T 1 , θ ∈ {Dis joint, T ouch, Contain}, and
r MBB:N:NE T 1 }, the result set is {R 5 , R 6 }.
As a second example, suppose the user is interested in the towns that are
Northwest–North of town T 1 . This query can be specified as follows: Q 2 =
{t|t is a town and t NW:N T 1 }. If no rewriting is performed, from the local sources
we get the following results: (i) from M 1 , town T 2 ; (ii) from M 2 and M 3 , the empty
set as, in map M 2 , no object satisfies the NW:N predicate whereas, in map M 3 , as
discussed in Sect. 8.6, the multi-tile predicate is not defined over pairs of points.
However, towns T 4 and T 5 in map M 3 well approximate the required conditions.
According to Proposition 8.3, the dist-based consistent rewriting will generate the
following local queries:
• Map M 1 : {t|t is a town, t NW:N T 1 }, the result is {T 2 }.
• Map M 2 : {t|t is a town, t NW:N T 1 }, the result set is empty.
• Map M 3 : {t|t is a town, t ψ T 1 , ψ ∈ {NW, N }}, the result set is {T 4 , T 5 }.
