1 / 30

Multi-Databases & Mediators

Multi-Databases & Mediators. DBMS. DBMS. DBMS. DBMS. data. data. data. data. Distributed Databases. Distributed Database System. Advantages of a DDBS. Modularity Fault Tolerance High Performance Data Sharing Low Cost Components. Issues. Data Distribution Exploiting Parallelism

dawson
Download Presentation

Multi-Databases & Mediators

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. Multi-Databases & Mediators

  2. DBMS DBMS DBMS DBMS data data data data Distributed Databases Distributed Database System

  3. Advantages of a DDBS • Modularity • Fault Tolerance • High Performance • Data Sharing • Low Cost Components

  4. Issues • Data Distribution • Exploiting Parallelism • Concurrency and Recovery • Heterogeneity

  5. Parallelism: Pipelining • Example: • T1 SELECT * FROM A WHERE cond • T2 JOIN T1 and B select join A B (with index)

  6. Parallelism: Concurrent Operations • Example: SELECT * FROM A WHERE cond data location is important... merge select select select A where A.x < 10 A where 10  A.x < 20 A where 20  A.x

  7. join strategy Join Processing • Example: JOIN A, B over attribute X B1 B2 A1 A2 A.x < 10 A.x  10 B.x < 10 B.x  10

  8. Join Processing • Example: JOIN A, B over attribute X B1 B2 A1 A2 A.z < 10 A.z  10 B.z < 10 B.z  10 join strategy

  9. Concurrency & Recovery • Two Phase Commit Bank Mainframe ATM

  10. 2PC: ATM Withdrawl • Mainframe is coordinator • Phase 1: ATM checks if money available; mainframe checks if account has funds (money and funds are “reserved”) • Phase 2: ATM releases funds; mainframe debits account

  11. Heterogeneous Databases Distributed Database System DBMS1 DBMS2 legacy web site data data data data

  12. Example: Amazon.com must specify at least one of these author: title: this attribute not returned subject: format: menu of choices price: cannot query on this attribute

  13. Example: BarnesAndNoble.com must specify at least one of these author: title: Menu of choices subject: format: can query if one of other attributes specified price:

  14. Why Limited Capabilities? • Search forms • Security • Indexes • Legacy

  15. Capability vs. Content • Capability description • Can only search for subject = “art,” “history,” “science” • Content description • Source only contains subject = “art,” “history,” “science”

  16. Outline • Describing source capabilities • Extending source capabilities • How mediators cope with limited capabilities • Mediator capabilities • Other topics mediator source source source

  17. Describing Query Capabilities R(X, Y, ... Z) • Adornments: • f: may or may not specify • u: cannot be specified • b: must be specified • c[S]: specified from list S • o[S]: optional, chose from S

  18. Describing Query Capabilities R(X, Y, ... Z) • With output restriction • f’ • u’ • b’ • c’[S] • o’[S] • Adornments: • f: may or may not specify • u: cannot be specified • b: must be specified • c[S]: specified from list S • o[S]: optional, chose from S

  19. Example • Relation R(X, Y, Z) • Description Templates: bu’f, uf’c[z1, z2] • Answerable queries: R(x1, Y, Z), R(X, Y, z1) • Unanswerable queries: R(X, y1, Z), R(X, Y, z3)

  20. Other Description Mechanisms • Tsimmis • query templates • Information Manifold • capability records (# bound attrs, conditions ok,...) • Disco • Garlic • black box • Contex-free grammars

  21. Extending Source Capabilities Query: author=“Freud” AND price > 10 wrapper amazon Source: R(author, price, ...) Template: b, u, ...

  22. Extending Source Capabilities Query: author=“Freud” AND price > 10 Wrapper Filter: price > 10 wrapper Source Query: author=“Freud” amazon Source: R(author, price, ...) Template: b, u, ...

  23. Another Example Query: (author = “Freud” OR author = “Jung”) AND price < 10 wrapper Barnes&Noble R(author, price, ...) No disjunctive conditions; Price can only be specified with author

  24. Another Example Query: (author = “Freud” OR author = “Jung”) AND price < 10 Union Operation wrapper Q1: author = “Freud” AND price < 10 Q2: author = “Jung” AND price < 10 Barnes&Noble R(author, price, …) No disjunctive conditions; Price can only be specified with author

  25. Extending Source Capabilities • General scheme: • try many query rewritings • check if query fragments supported by source • check if wrapper can combine answer fragments • do all this very efficiently!! [See ICDE99 paper] • Tsimmis, Info Manifold: no disjunctive queries • DISCO: no query splitting • Garlic: only CNF queries

  26. Mediator Processing Query: M(5, Y, Z, W, 3) M(X, Y, Z, W, U) = Join(R, T) mediator source source T(Z, W, U) f, u, b R(X, Y, Z) f, f, b

  27. Plan 1 Query: M(5, Y, Z, W, 3) (3) Join answers M(X, Y, Z, W, U) = Join(R, T) mediator (1) R(5, Y, Z) (2) T(Z, W, 3) source source T(Z, W, U) f, u, b R(X, Y, Z) f, f, b

  28. Plan 2 Query: M(5, Y, Z, W, 3) (3) Join answers (2) for each (z,w,u)  P: R(5, Y, u) M(X, Y, Z, W, U) = Join(R, T) mediator (1) P = T(Z, W, 3) source source T(Z, W, U) f, u, b R(X, Y, Z) f, f, b

  29. Mediator Plan Generation • Need feasible and efficient plan • Search space is huge • Tsimmis, Info Manifold, Garlic: • exponential algorithms • Polynomial algorithms: • often find optimal or near-optimal plan • bounded performance • [See ICDT99 Paper]

  30. Conclusion • Not all sources are created equal! • Need to • describe what sources can do • efficiently process queries with limited sources • describe what mediators can do • exploit content information • deal with unavailable sources

More Related