4.7 Interface and Query Semantics
4.7.1 Tree-Based Query Answering
The flexibility of a mediated P2P data integration system allows for the queries to be posed to the private ontology of any of the mediator peers in the network. However, there is no guarantee that there is a path, and in turns a possible answer, from the peer to which the query is posed and all other mediator peers in the network. Moreover, because of the autonomous nature of the mediator peers in open environment, even if such path exists,
there is no guarantee that the answer, if exists, will be shared with the peer to which the query is posed. As such, it is important to compute all the possible answers in the mediated P2P network. In order to retrieve all the possible answers in a mediated P2P network, a tree-based technique is proposed here to address this issue. The mediated P2P network, here, will be reduced by abstracting away the local network of each peer. The network is then represented by a graph with a set of nodes, corresponding to the set of mediator peers, and a set of arcs, representing the accessibility relations between the peers. Because there is no guarantee that the graph is acyclic, the proposed technique will have to account for a cyclic network and returns a tree that is based on an acyclic graph. The proposed technique attempts to find all possible paths from the mediator peer, to which the query is posed, to all the accessible nodes. This approach is particularly useful when satisfying the query is the only metric to consider (Yang and Garcia-Molina 2002). The definitions of the global answer, the set of all possible answers, and the local answers, at a certain data source, are then provided
Consider the mediated P2P network in Figure 18. For simplicity, only peers are displayed in Figure 18, while the local data sources of each mediated network are abstracted out. In order to calculate all the possible answers to a query posed to the mediator peer P1 in the
Figure 18: Example mediated P2P network
Note that, in Figure 19, the same node can appear in the tree more than once. Note also that the same node can appear in the same level more than once. This will depend on how many routes exist from the peer, represented by the root node, to the peer represented by this node. We prefixed the nodes in the levels, past the second level, in order to make it more readable. Calculating all the possible answer to a query posed to the peer P1 in the
network is equivalent to calculating the answers at all the nodes of the tree in Figure 19. This assumes that there is some mappings exist from the root, all the way, to the node at which the query is calculated.
Figure 19: Acyclic Query Answering Tree for the Network in Figure 18
The algorithm for generating the acyclic tree, like the one shown in Figure 19, takes the graph representing the mediated P2P network and returns the corresponding query answering tree based on the acyclic version of the graph. The acyclic version of the graph is attained through a step in the algorithm that ignores the child if it has already appeared in the list of ancestors of the parent. The algorithm for generating the tree is shown in Figure 20.
Given the tree in Figure 19, according to the proposed semantics, the global answer to a query q(x) posed to a peer Pi is expressed in term of the set of all possible answer to the
query. If we refer to the global answer as Ansg and the possible answers as Ansp, the
global answer for q(x) at Pi is expressed as follows:
Ansg (q(x), MPi) = BPi q(x)1 ꓴ Ansp (q(x), Pi, Pi) (39)
01) Generate-Acyclic-Query-Tree-From-Cyclic-Graph 02) Inputs: Cyclic Graph, A Peer Pi, A Query Q(x)
03) Outputs: Acyclic-Query-Tree 04) Begin
05) Create the root of the tree with label Pi
06) Push the root into the Stack 07) While the Stack is not empty
08) Pop from Stack into x
09) For each label l R(x) in the original graph
10) If l all-ancestor-labels(x) in the tree AND
A Mapping Glabel(x),l(Q(x)) Exists
11) Create a node y
12) Q(y) = Glabel(x),l(Q(x))
13) Push y into Stack
14) Add y to children(x) in the tree
15) End
16) End
17) End
18) End
Where:
And
And
The global answer to the query is the set of all possible answers in the query tree in a nested manner. In that sense, the beliefs of a nodes about a query affects the beliefs of all its ancestors about the equivalent queries but not the other way around. As such, the beliefs that a leaf node has about the query will affect its parent and so on until the root of the tree is reached.
Given a mediated P2P query tree as the one shown in Figure 19, a data source Sjk in the
mediated network of mediator peer MPj, and a query qj(x) over the global ontology of
mediator peer MPj. the local answer to the query qj(x) will be referred to as Ansl and will
be expressed as follows:
Where kjk(qj(x) is the extensionalization of the intensionally equivalent query to qj(x),
after applying the proper local mapping Ljk between the ontology of mediator peer MPj
and data source Sjk.
The following chapter will provide a case study to illustrate how to utilize the intensional logic and the intensional model for data integration systems in open environment.
BPi q(x)1 = ꓴkSikik(q(x)) (40)
Ansp (q(x), Pi, Pi) = ꓴ jChildren(Pi) Ansp (q(x), Pi, Pj) (41)
Ansp (q(x), Pi, Pj) = BPiBPj q(x)2 ꓴ Ansp (Gij(q(x)), Pj, Pj) (42)
Chapter 5
5
Case Study and Analysis
This chapter describes an example of applying the intensional logic and the intensional model to a real world example. The example uses the University-department world. Figure 21 shows a snapshot of the world with some professor student relations. The plan is to test seve1ral factors leading to the formal treatment of the conceptualization and ontology. We will create several ontologies for the same domain, that are not compatible with one another, and we will use them in order to describe the data integration in open environment.