Download presentation

Presentation is loading. Please wait.

Published byBrianna Phelps Modified over 2 years ago

1
What is a Quasi-Inverse? Jordan Johnson May 29, 2008 TWIGS at UCSC

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

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
Mappings as data? Operations on mappings: compose [Madhavan/Halevy, 2003] match/diff/etc [Bernstein, 2003] invert [Fagin, 2006] Well, only sometimes… Background: what, more?

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, where ran(f) Z Y, and f g f = f

10
Quasi-Inverse (of a function) Examples: f(x) = x 2 g 1 (x) = sqrt(x) g 2 (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, ~ 2 on 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 (I 1, I 2 ) such that I 1 and I 2 are instances of S, S´ (resp.) and satisfy . Id = (S, S´, id ), where id contains R(x) -> R(x) for all R in S. Note: I 1 (Inst(Id)) I 2 if I 1 ´ I 2.

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

16
Quasi-Inverse (of a mapping) Formal definition: Given a mapping M = (S, T, ), M´ = (T, S, ´) is a (~ 1, ~ 2 )-inverse of M iff Inst(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 (I 1 ~ M I 2 ) Sol(M, I 1 ) = Sol(M, I 2 ). 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)}

Similar presentations

Presentation is loading. Please wait....

OK

1st-order Predicate Logic (FOL)

1st-order Predicate Logic (FOL)

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google