Given a query Q, a semantic segment S
i
and the
intersection area between Q and S
i
named I
i
, the
segment reorganization is given as follows. Firstly,
the procedure verifies if I
i
is different from S
Ai
.
When a window query Q
j
covers totally S
A
(figure 1
- segment S
1
), it is not necessary to actualize S
Ai
because the intersection area I
i
is the same of S
i
.
On the other hand, when S
Ai
∩ Q
j
is different
from S
Ai
(figure 1 - segment S
3
), it is necessary to
reduce from S
Ai
the intersection area I
i
. If the
remaining geographic area has a complex form, it
must be adjusted as a rectangle shape.
After geographic area verification, the semantic
segment content should be updated. The data used to
answer Q must be removed from S, and if it remains
data, these remaining data should form a new
semantic segment S
i
’. The complete result of Q
always will generate a new segment. We illustrate
this procedure with the following example.
Example 4: Consider the query “Give me all
hotels within 5 miles with price higher than U$
100”. Suppose that the segment S
3
stores hotels with
diary price higher than U$ 50. In this case, S
3P
satisfies Q
P
and also S
3A
intersects partially with Q
J
.
After query execution in S
3
, this segment must be
reorganized (Figure 2).
Note that S
A3
∩ Q
J
is different from S
A3
, then S
A3
Å S
A3
- I
3
. The resulting area has a complex form,
and then it is adjusted as a rectangle shape. The data
used to answer Q (S
3
∩ Q) must be removed from S
3
(that is, Hotel.price > 100 in I
3
). The remaining data
S
3
^ ¬ Q (that is, Hotel.price > 50 and Hotel.price
< 100 in I
3
) is not null, then a new segment S
3
’ is
created with these remaining content.
Figure 2: An example of Segment Reorganization
4 LOCATION DEPENDENT
CACHE ARCHITECTURE
In this section we propose a Location Dependent
Semantic Cache Management – LDSCM (figure 3),
an architecture that support LDQ and provides
semantic cache management based on spatial
property. In the server, placed at the fixed network,
an object-relational database system stores and
manages the LDD. The mobile clients communicate
to the server through a wireless link and are
responsible for storing and managing its semantic
cache. Next section details the LDSCM components.
The component LDQ Query Generator generates
location dependent queries according to the database
scheme in the server. This module is responsible for:
(1) to elaborate a query; (2) to bind the user current
location and to send the query to the component
LDQ Query Processor; (3) to receive the complete
answer from LDQ Query Processor and to send it to
the application.
Initially, an application won't be represented for
user interface because the main objective of this
prototype is to test the proposed solutions. Once
proved the benefits of this new model, this will be
able to be implemented according to the
characteristics of different mobile devices, such as
notebook, palm, PDA and so on.
The component LDQ Query Processor is
responsible for the following tasks: (1) to determine
and execute the probe query, amending query and
reminder query, according to relationship with the
semantic segments in cache; and (2) to combine the
results obtained in cache with the results shipped
from the server and return the complete answer to
the component LDQ Query Generator. To
accomplish these tasks, the LDQ Query Processor is
composed by the following modules: Segments
Candidates Selector and Query Divisor and
Executor. The module Segments Candidates
Selector is responsible for determining the set
(CjSC) of semantic segments that are candidates to
answer the query Q. This process is executed using
the algorithm 1, as described in section 3.
Once defined the CjSC, the Query Divisor and
Executor component defines and execute the probe
query for each segment in CjSC as shown in
algorithm 2. This module also sends to the server the
remaining and amending queries when necessary.
The server receives queries from the client,
processes them, and sends the results back.
The complete probe query is composed by one or
more sub-queries. The reminder query result is
combined with the probe query to compose the
complete answer.
The portion of the answer that is not in cache
(reminder query) must be sent to the component
Cache Structures Manager. This component
reorganizes the semantic segments, as described in
algorithm 3.
The Cache Structures Manager is also
responsible for semantic caching replacement. If
necessary, the replacement is performed using the
ASCR policy (Manica et al., 2004).
Q
New
S
S
3P
∩ Q
P
in I
i
S
3P
-(S
3P
∩Q
P
) in I
i
I
3
S
3
S
3
S
3
- I
3
with complex
shape adjust
S
3
’
ICEIS 2005 - DATABASES AND INFORMATION SYSTEMS INTEGRATION
324