1 / 17

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

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. Outline. Problem Statement

ebony-blake
Download Presentation

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

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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 q16 q3 q4 q3 P6 q26 P6 q4 q51 q61 P4 P4 q15 P5 P2 q25 P5 P2 q2 q62 q52 q2 Query Dependency Graph Annotated Network 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 to=“LAX” Q4.select * from UA where to = “LAX” OR to =“JFK” Mapping table LH2UA

  10. q qT P T qTc m Check(qTC(r/) = q/T(r/)) qT T q P Yes No 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. Step1. Convert query q to its corresponding T-query qT = T Step2. Computes T-query q/T = U(T m) Step3. Outputs the query q from q/T 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 to=“ONT” 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 date=“11/21” Translated query Select * from UA where (to=“LAX” OR to=“ONT”) AND dt= “11/21”

  14. Local DB Map. Tables 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

More Related