Data Sharing Through Query Translation in Peer-to-Peer Systems - PowerPoint PPT Presentation

About This Presentation
Title:

Data Sharing Through Query Translation in Peer-to-Peer Systems

Description:

Data Sharing Through Query Translation in Peer-to-Peer Systems. Md. ... Constructs a T-query qcT with attributes att(q ) defined as. qTc = att(q )(T m T ) 3. ... – PowerPoint PPT presentation

Number of Views:13
Avg rating:3.0/5.0
Slides: 18
Provided by: ilya4
Category:

less

Transcript and Presenter's Notes

Title: Data Sharing Through Query Translation in Peer-to-Peer Systems


1
Data Sharing Through Query Translation in
Peer-to-Peer Systems
  • Md. Mehedi Masud
  • http//www.site.uottawa.ca/mmasud
  • Fazel Keshtkar
  • http//www.site.uottawa.ca/akesh081

Course CSI5311 Prof Dr. Iluju
Kiringa http//www.site.uottawa.ca/kiringa March
24,2004
2
Outline
  • Problem Statement
  • Motivating Example Scenario
  • Peer-to-Peer Query
  • Query Translation Algorithm
  • Future Work and Conclusion

3
Problem Description
  • We have autonomous nodes/peers
  • Autonomous structured Data source(Database)
  • No global schema, no centralized control
  • Query is posed against the schema of local
    peer/node
  • Query propagates to other peers to retrieve
    related data from other peers

4
Related Work
  • Mapping table and their Semantics
    Kementsietsdis
  • Keyword-based search Y. Sagiv and M. Yannakakis
  • Queries on Homogeneous Schemas Huebsch
  • Queries using syntactic rule C.C. K. Chang and
    H. Garcia-Molin

5
EXAMPLE SCENARIO
Q1. Select from LH where dest L.A
What if user also wants to retrieve information
from UA flights to Los Angels. The following will
be like Q2. Select from UA where (to LAX OR
to ONT)
How this is achieved?
6
Peer-2-Peer Query
  • Query Semantics
  • Mapping Tables
  • Sound and Complete Translations of Query

7
Query Semantics
  • Local Query
  • Global Query
  • Query Dependencies ( dep(qk) qj )

How exactly and possible translation of queries
are achieved?
qP(q1,q2,q3,q4,q15, q25, q16 q26 )
q1
P1
q1
P1
P3
P3
q3
q16
q4
q3
P6
P6
q26
q4
q51
q61
P4
P4
q15
P5
P2
P5
q25
P2
q2
q62
q52
q2
Annotated Network
Query Dependency Graph
Peer-to-peer Network
8
Sound and Complete Translations
  • Let q1 and q2 be queries over peers P1 and P2 and
    m be a mapping table of the two peers and q1
    ?E(R)
  • Then q2 is a sound translation of q1 with respect
    to mapping table m, denoted by q1 q2, if for
    every relation instance r2 of P2 and t2 ? q2(r2),
    there exists a valuation ? of m and a tuple t ?
    ?E(?(m)) such that ?att(q2)(t) t2

m
9
Example
Q1. Select from LH where dest L.A
Q2. Select from UA where (to LAX OR to
ONT)
Q3. select from UA where toLAX
Q4. select from UA where to LAX OR to JFK
Mapping table LH2UA
10
Algorithm for Sound and Complete translation
Let two queries q and q? over peer P and P? and
the mapping table is m between them 1. Converts
both q and q? to their corresponding T-queries
qT T and q?T T? 2.
Constructs a T-query qcT with attributes att(q?)
defined as qTc
?att(q?)(T m T?) 3. Checks whether
qTc is equivalent to q?T that is. For every
instance r? of peer P?,
qTc (r?) q?T(r?) 4. If qTc is equivalent q?T
then the algorithm output yes
11
Computing Translation
- Let P and P/ be two peers that expose
attributes U and U/ - q is query over P - m is
mapping table between the set of attributes U and
U/ - convert q to q/ with respect to mapping
table m
Algorithm
12
Example
Relation at peer P1
Relation at peer P2 LH ( fno, date, time,
dest) UA ( flight, dt, tm,
to)
Query Select from LH where dest L.A
Step 1 Create T-query
Step 2 Computes T-query q/T
?U?(T m)
To
Flight
Dt
Tm
Step 3 Translated Query q/ select from UA
where to LAX or toONT
X2
Y2
Z2
LAX
X4
Y4
Z4
ONT
q/T
13
Using Multiple Mapping Tables
  • Converts q into its equivalent disjunctive normal
    form
  • Proceed with each disjunct Dj
  • For each Dj, select a mapping table mj for the
    translation
  • For each Dj consider it as T-query Tj

Mapping table used date2dt and dest2to
Query posed in Peer 1 Select from LH where
dest LA AND date11/21
Translated query Select from UA where (toLAX
OR toONT) AND dt 11/21
14
The Architecture of peer
Graphical User Interface
Servant
Query Processing Engine
To Peer-to-Peer Network
SQL Parser
Map. Table Manager
Network Layer
15
Future work and Conclusion
  • Problems of data sharing between autonomous
    source have been discussed
  • How to use mapping tables to translate query
  • Proposed algorithm to compute sound and complete
  • translation of query
  • The idea can be enhanced to support more
    expressive query, like negation, join and complex
    query

16
Thanx
17
T-Queries
  • How to construct T-Query?
  • Transform query q into an equivalent query q/ of
  • the from ?E(R), where E is in disjunctive form.
  • Create table with attribute R and add each row
    for
  • each disjunctive form

Example select from LH where dest L.A OR
dest S.F
Dest
Fno
Date
Time
X1
Y1
Z1
LA
X2
Y2
Z2
SF
T-Query qT
Write a Comment
User Comments (0)
About PowerShow.com