Database Reference
In-Depth Information
Figure 7. Structure of tables peer, constraints and partners in 6P2P database
8. A propagation is a relationship between a peer (the target peer ) and another peer (the source peer )
where the query has been sent (propagated) to. While propagating queries, the following three
objectives are taken into account: (1) avoiding cycles, (2) deciding about propagation modes ( P2P
or local ), and (3) deciding about merging modes ( full or partial ).
6P2P Database
A peer's database consists of five tables: Peer , Constraints , Partners (Figure 7), Queries , and Propaga-
tions (Figure 8).
1. Peer(myPeer, myPatt, myData, xfdXQuery, keyXQuery) - has exactly one row, where: myPeer - the
URL of the peer owning the database; myPatt - the schema (tree-pattern formula) of the data source;
myData - the peer's data source, i.e. an XML document or an XML view over some data reposi-
tories. xfdXQuery and keyXQuery are XQuery programs obtained by the translation of constraints
specifications, TP-XFDs and keys, respectively.
2. Constraints(constrId, constrType, constrExp) - stores information about the local data constraints
(in this chapter we discuss only TP-XFDs).
3. Partners(partPeer, partPatt, mapXQuery) - stores information about all peer's partners (acquain-
tances), where: partPeer - the URL of the partner; partPatt - the right-hand side of the schema
mapping to the partner (variable names reflect correspondences between paths in the source and
in the target schema). mapXQuery is an XQuery program obtained by translation(by means of
Algorithm 1) of the mapping determined by the Peer.myPatt (left-hand side of the mapping) and
Partners.partPatt (right-hand side of the mapping).
4. Queries and Propagations (Figure 8) maintain information about queries, qryId , and their threads,
qryThreadId , managed in the 6P2P system. The user specifies a qualifier of the query, myQualif ,
as well as propagation ( propagMode ) and merging ( mergeMode ) modes.
Query Propagation in 6P2P
Symbolic values in tables (Figure 8) indicate relationships between tuples in tables maintained by peers
@ P and @ P' . Algorithm 3 describes propagation of a query (more precisely, a thread of the query) stored
in @ P : Queries . The propagation mode can be either P2P (a query is to be propagated to all partners
with P2P mode), or local (a query is to be answered in the peer's data source without propagation).
In Algorithm 3, the tuple q 1 contains a query and its context (e.g. q 1. myPatt is the schema against
which q 1. myQualif has been formulated). LeadsToCycle ( q 1, @ P' ) returns true if the propagation causes
Search WWH ::




Custom Search