Database Reference
In-Depth Information
q 1. myQualif := q.myQualif ; // the query qualifier
q 1. propagMode := “ P2P ”;
q 1. mergeMode := q.mergeMode ;
q 1. myPatt := @ P : Peer.myPatt ; // the schema of @ P
foreach $@ P' in @ P : Partners.partPeer {
// attempt to propagate the query to all partners
if LeadsToCycle ( q 1, @ P' ) and not discoveryMayBeDone ( q 1,@ P )
then next
if LeadsToCycle ( q 1, @ P' ) then q 1. propagMode := “ local ”;
if acceptedPropagation ( q 1, @ P' ) then
insert into @ P : Propagations
values ( q 1. propagId , q 1. qryThreadId , @ P' , null , “ Waiting ”)
}
}
If the source peer @ P' accepts the propagation q 1 then it creates the following tuple q 2 and inserts
it into the @ P' : Queries table:
q 2. qryThreadId := new qryThreadId ,
q 2. qryId := q 1. qryId ,
q 2. qryTrace := q 1. qryTrace ,
q 2. tgtPeer := q 1. myPeer ,
q 2. myQualif := ( q 1. myQualif ). rewrite ( q 1. myPat t,@ P' : Partners.partPatt
where Partners.partPeer = q 1. myPeer ),
q 2. propagMode
:= q 1. propagMode ,
q 2. mergeMode
:= q 1. mergeMode ,
q 2. tgtPropagId
:= q 1. propagId ,
q 2. tgtThreadId
:= q 1. qryThreadId ,
q 2. tgtAnswer
:= null ,
q 2. tgtAnswer
:= “ Waiting ”,
q 2. myXQuery
:= XQuery program obtained by automatic translation
of the query into XQuery.
CONCLUSION
The chapter discusses a method for schema mapping and query reformulation in a P2P XML data in-
tegration system. The discussed formal approach enables us to specify schemas, schema constraints,
schema mappings, and queries in a uniform and precise way. Based on this approach we define some
basic operations used for query reformulation and data merging, and propose algorithms for automatic
generation of XQuery programs performing these operations in real. We discussed some issues concern-
ing query propagation strategies and merging modes, when missing data is to be discovered in the P2P
integration processes. The approach is implemented in 6P2P system. We presented its general architecture,
and sketched the way how queries and answers were sent across the P2P environment.
Search WWH ::




Custom Search