Data Integration with Dependent Sources Anish Das Sarma

  • Slides: 36
Download presentation
Data Integration with Dependent Sources Anish Das Sarma, Xin (Luna) Dong, Alon Halevy Yahoo!

Data Integration with Dependent Sources Anish Das Sarma, Xin (Luna) Dong, Alon Halevy Yahoo! Research, AT&T Labs-Research, Google Inc. October 31, 2020 1

based Query Answering in Best Dataguess, Integration on 7 websites A = Ui Ai

based Query Answering in Best Dataguess, Integration on 7 websites A = Ui Ai Ai’s may have conflicts: D 1, D 2, D 3: Paris D 4, D 5: Inria Q: “France capital” Mediated Schema Q 1 A 1 Q 2 D 1 A 5 Q 5 A A A 2 3 4 Q 3 D 5 D 2 D 3 October 31, 2020 Count number of sources D 4 Assuming independence in counting! Sources can copy from each other Consider number of independent sources for each answer 2

Motivation [Solomon project, Luna Dong et. al. ] • Web data consists of an

Motivation [Solomon project, Luna Dong et. al. ] • Web data consists of an ecosystem of dependent sources • Information extracted from Abe. Books. com – Data from 877 bookstores – 465 pairs of sources involved copying – 314 copiers, 202 copy from a single source – Some copy all tuples, some copy a fraction October 31, 2020 3

Goal • Build a system, IDS, for Integrating Dependent Sources • This paper: –

Goal • Build a system, IDS, for Integrating Dependent Sources • This paper: – Proposed a system for query answering with dependent sources – Address theoretical challenges in building such a system • Note: detecting dependencies is part of other work [Solomon] October 31, 2020 4

Source Selection Source Ordering Cost Computation Coverage Computation Configuration Data Sources Q Query Answering

Source Selection Source Ordering Cost Computation Coverage Computation Configuration Data Sources Q Query Answering October 31, 2020 Answer 5

Source Selection Source Ordering Cost Computation Coverage Computation Configuration Data Sources 1) Given a

Source Selection Source Ordering Cost Computation Coverage Computation Configuration Data Sources 1) Given a query Q, which data sources to use for Q tradeoff) answering this query? (cost-coverage Query Answering October 31, 2020 Answer 6

Source Selection Source Ordering Cost Computation Coverage Computation Configuration Data Sources 2) In which

Source Selection Source Ordering Cost Computation Coverage Computation Configuration Data Sources 2) In which order should we query a set S of sources to get answers as soon as. Qpossible? Query Answering October 31, 2020 Answer 7

Source Selection Source Ordering Cost Computation Coverage Computation Configuration Data Sources 3) For a

Source Selection Source Ordering Cost Computation Coverage Computation Configuration Data Sources 3) For a subset S of sources, what fraction of the Q total set of tuples is captured by tuples in S? Coverage is core part of previous problems. Query Answering October 31, 2020 Answer 8

Source Selection Source Ordering Cost Computation Coverage Computation Configuration Data Sources Answers to source

Source Selection Source Ordering Cost Computation Coverage Computation Configuration Data Sources Answers to source selection and ordering problems depend on cost model Q Query Answering October 31, 2020 Answer 9

Next • Formal problem definitions – Dependency model – Cost model for query answering

Next • Formal problem definitions – Dependency model – Cost model for query answering – Coverage and optimization problems • Algorithms and complexity result summary – Coverage problem (CP) – Cost minimization problem (CMP) – Maximum coverage problem (MCP) – Source ordering problem (SOP) October 31, 2020 10

Next • Formal problem definitions – Dependency model – Cost model for query answering

Next • Formal problem definitions – Dependency model – Cost model for query answering – Coverage and optimization problems • Algorithms and complexity results summary – Coverage problem (CP) – Cost minimization problem (CMP) – Maximum coverage problem (MCP) – Source ordering problem (SOP) October 31, 2020 11

Dependency Model: Example #tuples provided independently Edges depict copying October 31, 2020 (1) Fraction-copying:

Dependency Model: Example #tuples provided independently Edges depict copying October 31, 2020 (1) Fraction-copying: S 6 copies a random 0. 8 fraction of tuples from S 2 12

Dependency Model: Example (2) Selectioncopying: S 2 copies all tuples with A<4 from S

Dependency Model: Example (2) Selectioncopying: S 2 copies all tuples with A<4 from S 1 =5 B< A< 4 2< S 3 (B > 5) e ^( tru A> 2) S 2 (3) Histogram-copying combines selection- and fraction-copying S 4 October 31, 2020 13

Query Answering • This talk: query to find all tuples (``select *’’) • Given

Query Answering • This talk: query to find all tuples (``select *’’) • Given set S = {S 1, …, Sn}, we want Q(S) = UQ(Si) • Technical point: • Assume each tuple t annotated with the source S providing it; i. e. , ``tuple’’ is (t, S) • Extension of results for other queries in paper • Selections, projections, joins October 31, 2020 15

Cost Model • Given set S={S 1, …, Sn} of sources to query, we

Cost Model • Given set S={S 1, …, Sn} of sources to query, we consider three models for cost of querying T: – Linear cost model: Cost = Σi |Si| • Data stored locally, and scanning (I/O) cost dominates – Number-of-sources cost model: Cost = |T| • When ``charged’’ for every source (e. g. , web services) – Arbitrary source cost model: Cost = Σi ci • Each source has an arbitrary cost ci October 31, 2020 16

Next • Formal problem definitions – Dependency model – Cost model for query answering

Next • Formal problem definitions – Dependency model – Cost model for query answering – Coverage and optimization problems • Algorithms and complexity results summary – Coverage problem (CP) – Cost minimization problem (CMP) – Maximum coverage problem (MCP) – Source ordering problem (SOP) October 31, 2020 17

Coverage Problem: What fraction of total tuples are covered by a subset? Example: What

Coverage Problem: What fraction of total tuples are covered by a subset? Example: What is the coverage of {S 4, S 5}? Total #tuples = 300 S 5 gets all tuples from S 1, S 2 S 4 provides 50 new tuples Coverage = 250/300 October 31, 2020 18

Cost Minimization Problem Cost Min. Problem: Which sources to query to: (1) get all

Cost Minimization Problem Cost Min. Problem: Which sources to query to: (1) get all tuples, (2) minimize total cost? Linear Cost Model: {S 3, S 4, S 5} (cost = 100 + 200 = 400) Num-sources Cost Model: {S 5, S 6} (cost = 2) October 31, 2020 19

Maximum Coverage Problem Max. Coverage Problem: Given max. cost bound, what sources to query

Maximum Coverage Problem Max. Coverage Problem: Given max. cost bound, what sources to query to: (1) get max. tuples, (2) be within cost bound? Cost Bound = 1 (num-sources model): Query S 6: Get 255 tuples: -80 from S 2 -50 each from S 3 and S 4 -75 from S 1 (through S 3 and S 4: because of independence of copying) October 31, 2020 20

Source Ordering Problem Num. tuples Source Ordering Problem: What order to query sources to:

Source Ordering Problem Num. tuples Source Ordering Problem: What order to query sources to: obtain tuples ``as-fast-as-possible’’. (Intuitively, max-area-under-curve plotting cost versus tuples retrieved) S 5 S 4 S 6 S 3 Example: Query S 6 -> S 5 -> other sources - S 6 gives 255 tuples - S 5 gives remaining 45 tuples Query S 1 -> S 2 -> S 3 -> S 4 -> S 5 -> S 6 S 2 - S 1 gives 100 tuples - S 2 gives 100 tuples - S 3 gives 50 tuples - S 4 gives 50 tuples S 1 Source ordering 21

Next • Formal problem definitions – Dependency model – Cost model for query answering

Next • Formal problem definitions – Dependency model – Cost model for query answering – Coverage and optimization problems • Algorithms and complexity results summary – Coverage problem (CP) – Cost minimization problem (CMP) – Maximum coverage problem (MCP) – Source ordering problem (SOP) October 31, 2020 25

Summary of results • Paper presents detailed theoretical investigation: – All four problems: coverage,

Summary of results • Paper presents detailed theoretical investigation: – All four problems: coverage, cost-minimization, maxcoverage, source-ordering – All cost models: linear, num-sources, arbitrary – Hardness results, polynomial-time algorithms, tractable sub-classes, approximations • Next: – 1 -2 slides on each of the problems, highlighting main results – Focus on fraction-copying model October 31, 2020 26

Coverage Problem • #P-complete in general – Reduction from the problem of evaluating the

Coverage Problem • #P-complete in general – Reduction from the problem of evaluating the number of satisfying assignments in a monotone 2 -DNF formula October 31, 2020 27

Coverage Problem • PTIME when each copy-fraction is 0 or 1 – Algorithm-A: •

Coverage Problem • PTIME when each copy-fraction is 0 or 1 – Algorithm-A: • Compute exact coverage of the subset of sources • Compute total number of tuples among all sources October 31, 2020 28

Coverage Problem • PTIME with select-copying • Lot of sources copy by applying selection

Coverage Problem • PTIME with select-copying • Lot of sources copy by applying selection queries • Knowledge of selection predicate makes problem tractable October 31, 2020 29

Coverage Problem • PTIME randomized approximation algorithm October 31, 2020 30

Coverage Problem • PTIME randomized approximation algorithm October 31, 2020 30

Coverage: Randomized Algorithm • Polynomial-time randomized (MC) algorithm – Algorithm runs in: O(NE log(1/d)

Coverage: Randomized Algorithm • Polynomial-time randomized (MC) algorithm – Algorithm runs in: O(NE log(1/d) / e 2) – Coverage is within error ‘e’ with probability ≥ (1 -d) • Randomized algorithm: – Randomly include/omit each edge with probability based on copy-fraction of edge – Run Algorithm-A on the resulting graph • Final coverage: average of multiple iterations October 31, 2020 31

Coverage: Randomized Algorithm Coverage of S 6: -Retain edges based on fraction -Compute coverage

Coverage: Randomized Algorithm Coverage of S 6: -Retain edges based on fraction -Compute coverage -Correct answer = 255/300 tuples Iteration-1: #covered tuples = 300 Iteration-2: #covered tuples = 200 Compute average coverage October 31, 2020 32

Next • Formal problem definitions – Dependency model – Cost model for query answering

Next • Formal problem definitions – Dependency model – Cost model for query answering – Coverage and optimization problems • Algorithms and complexity results summary – Coverage problem (CP) – Cost minimization problem (CMP) – Maximum coverage problem (MCP) – Source ordering problem (SOP) October 31, 2020 33

CMP, MCP, SOP: Complete Results a Number-of-sources cost model b Linear cost-model and arbitrary

CMP, MCP, SOP: Complete Results a Number-of-sources cost model b Linear cost-model and arbitrary source cost model c With PTIME coverage algorithm • Next: – Sample of results from the table above – Greedy algorithm for picking sources October 31, 2020 34

Other Results a Number-of-sources cost model b Linear cost-model and arbitrary source cost model

Other Results a Number-of-sources cost model b Linear cost-model and arbitrary source cost model c With PTIME coverage algorithm • All problems intractable in general October 31, 2020 35

Greedy Algorithm • Greedy algorithm for cost-minimization, maximum coverage, source ordering: – Pick the

Greedy Algorithm • Greedy algorithm for cost-minimization, maximum coverage, source ordering: – Pick the source S maximizing I(S)/c(S) – I(S) = total number of new tuples – c(S) = cost of querying S • Greedy algorithm is optimal when all sources: – Copy from at most one source – Copy all or zero tuples (i. e. , fraction=1) October 31, 2020 36

Greedy Algorithm Results a Number-of-sources cost model b Linear cost-model and arbitrary source cost

Greedy Algorithm Results a Number-of-sources cost model b Linear cost-model and arbitrary source cost model c With PTIME coverage algorithm • Optimal for Single-source copying: • Copy from at most one source • Copy all or zero tuples (i. e. , fraction=1) October 31, 2020 37

Greedy Algorithm Results a Number-of-sources cost model b Linear cost-model and arbitrary source cost

Greedy Algorithm Results a Number-of-sources cost model b Linear cost-model and arbitrary source cost model c With PTIME coverage algorithm • Approximations in the general-case: • Log-approx (in size of largest source) for cost-minimization • (1 -1/e)-approx for maximum-coverage • 2 -approx for source-ordering October 31, 2020 38

Summary • Contributions: – Studied query answering with dependent sources – Simple model to

Summary • Contributions: – Studied query answering with dependent sources – Simple model to capture dependencies – Four important problems: coverage, costminimization, maximum-coverage, source ordering – Algorithms and complexity results for the problems • Future: – Build a system based on our theoretical foundations – Specific open problems laid out in the paper October 31, 2020 41

Thanks! October 31, 2020 42

Thanks! October 31, 2020 42