1 / 18

What is a Quasi-Inverse?

What is a Quasi-Inverse?. Jordan Johnson May 29, 2008 TWIGS at UCSC. A. B. Background: Data Exchange. Given: Databases A, B Problem: Populate B with data from A. Background: Schemata. A, B specified by schemata S , T Mappings relate the schemata. S = { EmployeeDB: {

jin-booker
Télécharger la présentation

What is a Quasi-Inverse?

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. What is a Quasi-Inverse? Jordan Johnson May 29, 2008 TWIGS at UCSC

  2. A B Background: Data Exchange • Given: Databases A, B • Problem: Populate B with data from A

  3. Background: Schemata • A, B specified by schemata S, T • Mappings relate the schemata • S = { EmployeeDB: { • HrlyEmp(id, name, wage), • SalariedEmp(id, name, sal) • } } • T = { PersonnelDB: { • Emp(id, name, ssn) • } }

  4. Background: A Mapping M = (S, T, ) where  = { (id, nm, w): HrlyEmp(id, nm, w)  (ssn): Emp(id, nm, ssn), (id, nm, s): SalariedEmp(id, nm, s)  (ssn): Emp(id, nm, ssn) } are tuple generating dependencies specifying the mapping.

  5. Background: what, more? • Mappings as data? • Operations on mappings: • compose [Madhavan/Halevy, 2003] • match/diff/etc [Bernstein, 2003] • invert [Fagin, 2006] • Well, only sometimes…

  6. The problem with inverses… • Original must be injective. • S-T mapping • Defined w.r.t. schemata • Domain/range are DB instances

  7. Our example again: (id, nm, w): HrlyEmp(id, nm, w)  (ssn): Emp(id, nm, ssn), (id, nm, s): SalariedEmp(id, nm, s)  (ssn): Emp(id, nm, ssn)

  8. Other problematic mappings: • Projection: • {P(x, y) Q(x)} • Union: • {P(x)  R(x), Q(x)  R(x)} • Decomposition: • {P(x, y, z)  Q(x, y) ^ R(y, z)}

  9. Quasi-Inverse (of a function) • Given f : X -> Y, a function g is a quasi-inverse if: • g : Z -> X, whereran(f)  Z  Y, and • f  g  f = f

  10. Quasi-Inverse (of a function) • Examples: • f(x) = x2 • g1(x) = sqrt(x) • g2(x) = -sqrt(x) • f(x) = x • g(x) = x + , where 0    1.

  11. Features of Quasi-Inverses • Weaker conditions than for inverse • Still recovers some of the original • If an inverse f exists: • a single quasi-inverse g exists • g = f

  12. Quasi-Inverse (of a mapping) • Problem: • What’s a good analogous quasi-inverse definition for schema mappings?

  13. Quasi-Inverse (of a mapping) • Idea: • Parameterize the idea of “inverse” w.r.t. equivalence relations ~1, ~2on schema instances.

  14. Quasi-Inverse: Preliminaries • S´ is a replica of S. • Instance I´ is a replica of I. • For mapping M = (S, S´, ), • Inst(M) = set of all (I1, I2) such that I1 and I2 are instances of S, S´ (resp.) and satisfy . • Id = (S, S´, id), where id containsR(x) -> R(x) for all R in S. • Note: I1 (Inst(Id)) I2 if I1´ I2.

  15. Quasi-Inverse: Preliminaries • Note: M’ is an inverse of M if Inst(Id) = Inst(M’ · M). • For a binary relation D, let I1D[~1, ~2] I2 if there exist J1, J2 such that (I1, I2) ~(1,2) (J1, J2) and J1D J2.

  16. Quasi-Inverse (of a mapping) • Formal definition: • Given a mapping M = (S, T, ),M´ = (T, S, ´) is a (~1, ~2)-inverse of M iffInst(Id)[~1, ~2] = Inst(M’ · M)[~1, ~2].

  17. Quasi-Inverse (of a mapping) • Again, M = (S, S´, ). • Let Sol(M, I) be the set of solutions for instance I under M: all J such that (I, J) satisfy . • Let (I1~M I2) Sol(M, I1) = Sol(M, I2). • M’ is a quasi-inverse of M means:M’ is a (~M, ~M)-inverse of M.

  18. Example Quasi-Inverses • Projection: • {P(x, y) Q(x)} • QI: {Q(x)  z.P(x,z)} • Union: • {P(x)  R(x), Q(x)  R(x)} • QI: {R(x)  P(x)  Q(x)}

More Related