• Aucun résultat trouvé

On the Complexity of Deriving Schema Mappings from Database Instances

N/A
N/A
Protected

Academic year: 2022

Partager "On the Complexity of Deriving Schema Mappings from Database Instances"

Copied!
49
0
0

Texte intégral

(1)

On the Complexity of Deriving Schema Mappings from Database Instances

Pierre Senellart1;2 Georg Gottlob3

1

2

3

30 November 2007, Gemo Seminar

(2)

Different sources organize the same data differently

Jeffrey D. Ullman

List of publications from the DBLP Bibliography Server FAQ

Coauthor Index Ask others: ACM DL/Guide CiteSeer CSB Google MSN Yahoo

Home Page

2007

240 EE Foto N. Afrati, Chen Li, Jeffrey D. Ullman: Using views to generate efficient evaluation plans for queries. J. Comput. Syst. Sci. 73(5): 703724 (2007)

2005

239 EE Jeffrey D. Ullman: Gradiance OnLine Accelerated Learning. ACSC 2005: 36

238 EE Serge Abiteboul, Rakesh Agrawal, Philip A. Bernstein, Michael J. Carey, Stefano Ceri, W. Bruce Croft, David J. DeWitt, Michael J. Franklin, Hector GarciaMolina, Dieter Gawlick, Jim Gray, Laura M. Haas, Alon Y. Halevy, Joseph M. Hellerstein, Yannis E. Ioannidis, Martin L. Kersten, Michael J. Pazzani, Michael Lesk, David Maier, Jeffrey F. Naughton, HansJörg Schek, Timos K. Sellis, Avi Silberschatz, Michael Stonebraker, Richard T. Snodgrass, Jeffrey D. Ullman, Gerhard Weikum, Jennifer Widom, Stanley B.

Zdonik: The Lowell database research selfassessment. Commun. ACM 48(5): 111118 (2005) 237 EE Serge Abiteboul, Richard Hull, Victor Vianu, Sheila A. Greibach, Michael A. Harrison, Ellis Horowitz,

Daniel J. Rosenkrantz, Jeffrey D. Ullman, Moshe Y. Vardi: In memory of Seymour Ginsburg 1928 2004.

SIGMOD Record 34(1): 512 (2005)

2003

236 EE Jeffrey D. Ullman: A Survey of New Directions in Database System. DASFAA 2003: 3

235 EE Jeffrey D. Ullman: Improving the Efficiency of DatabaseSystem Teaching. SIGMOD Conference 2003:

13

234 EE Jim Gray, HansJörg Schek, Michael Stonebraker, Jeffrey D. Ullman: The Lowell Report. SIGMOD Conference 2003: 680

233 EE Serge Abiteboul, Rakesh Agrawal, Philip A. Bernstein, Michael J. Carey, Stefano Ceri, W. Bruce Croft, David J. DeWitt, Michael J. Franklin, Hector GarciaMolina, Dieter Gawlick, Jim Gray, Laura M. Haas, Alon Y. Halevy, Joseph M. Hellerstein, Yannis E. Ioannidis, Martin L. Kersten, Michael J. Pazzani, Michael Lesk, David Maier, Jeffrey F. Naughton, HansJörg Schek, Timos K. Sellis, Avi Silberschatz, Michael Stonebraker, Richard T. Snodgrass, Jeffrey D. Ullman, Gerhard Weikum, Jennifer Widom, Stanley B.

Zdonik: The Lowell Database Research Self Assessment CoRR cs.DB/0310006: (2003)

232 EE Anand Rajaraman, Jeffrey D. Ullman: Querying websites using compact skeletons. J. Comput. Syst. Sci.

66(4): 809851 (2003)

2001

231 EE Chen Li, Mayank Bawa, Jeffrey D. Ullman: Minimizing View Sets without Losing QueryAnswering Power.

ICDT 2001: 99113

230 EE Anand Rajaraman, Jeffrey D. Ullman: Querying Websites Using Compact Skeletons. PODS 2001 229 EE Foto N. Afrati, Chen Li, Jeffrey D. Ullman: Generating Efficient Plans for Queries Using Views. SIGMOD

Conference 2001: 319330

228 EE Edith Cohen, Mayur Datar, Shinji Fujiwara, Aristides Gionis, Piotr Indyk, Rajeev Motwani, Jeffrey D.

Ullman, Cheng Yang: Finding Interesting Associations without Support Pruning. IEEE Trans. Knowl.

Data Eng. 13(1): 6478 (2001)

2000

227 Hector GarciaMolina, Jeffrey D. Ullman, Jennifer Widom: Database System Implementation PrenticeHall 2000

226 EE Jeffrey D. Ullman: A Survey of AssociationRule Mining. Discovery Science 2000: 114

225 EE Edith Cohen, Mayur Datar, Shinji Fujiwara, Aristides Gionis, Piotr Indyk, Rajeev Motwani, Jeffrey D.

Ullman, Cheng Yang: Finding Interesting Associations without Support Pruning. ICDE 2000: 489499 224 EE Shinji Fujiwara, Jeffrey D. Ullman, Rajeev Motwani: Dynamic MissCounting Algorithms: Finding

(3)

Different sources organize the same data differently

Advanced Scholar Search

Scholar Preferences Scholar Help

Scholar All articles Recent articles Results 1 10 of about 12 for author:"jd ullman". (0.07 seconds)

jd ullman J Ullman J Hopcroft A Rajaraman B Konikow ska A Aho

Querying websites using compact skeletons all 11 versions »

A Rajaraman, JD Ullman Journal of Computer and System Sciences, 2003 Elsevier Several commercial applications, such as online comparison shopping and process automation, require integrating information that is scattered across multiple w ebsites or XML documents. Much research has been devoted to this problem, ...

Cited by 13 Related Articles Web Search

[BOOK] Wprowadzenie do teorii automatów, jezyków i obliczen JE Hopcroft, JD Ullman, B Konikow ska 2003 Wydaw . Naukow e PWN Cited by 15 Related Articles Web Search

Improving the efficiency of databasesystem teaching all 3 versions »

JD Ullman Proceedings of the 2003 ACM SIGMOD international conference …, 2003 portal.acm.org ABSTRACT The education industry has a very poor record of produc tivity gains.

In this brief article, I outline some of the w ays the teaching of a college course in database systems could be made more ecient, and sta time used ...

Cited by 4 Related Articles Web Search

A survey of new directions in database systems all 5 versions »

JD Ullman Database Systems for Advanced Applications, 2003.(DASFAA …, 2003 ieeexplore.ieee.org A survey of new directions in database systems. Ullman, JD Stanford University;

This paper appears in: Database Systems for Advanced Applications, 2003.

(DASFAA 2003). Proceedings. Eighth International ...

Cited by 3 Related Articles Web Search [CITATION] ????

AV Aho, R Sethi, JD Ullman 2003 ??: ???????

Cited by 6 Related Articles Web Search [BOOK] Automi, linguaggi e calcolabilità

… Hopcroft, R Motw ani, JD Ullman, L Bernardinello, L … 2003 Pearson Education Italia Cited by 5 Related Articles Web Search

[CITATION] ???????

H GarciaMolina, JD Ullman, J Widom 2003 ??: ???????

Cited by 4 Related Articles Web Search [BOOK] Implementacja systemów baz danych

H GarciaMolina, J Widom, M Jurkiew icz, JD Ullman 2003 Wydaw nictw a Naukow oTechniczne Cited by 3 Related Articles Web Search

[BOOK] Projektowanie i analiza algorytmów: klasyczna praca z teorii algorytmów komputerowych AV Aho, JE Hopcroft, JD Ullman, W Derechow ski 2003 Helion

Cited by 2 Related Articles Web Search [CITATION] ???????

AV AHO, JE HOPCROFT, JD ULLMAN 2003 ??: ???????

Cited by 1 Related Articles Web Search

Result Page: 1 2 Next

Google Home About Google About Google Scholar

©2007 Google

(4)

Motivation

Context

Multiple data sources containing information about similar entities, with someredundancy (e.g., sources of the deep Web).

Several different ways to present this information, i.e., several different schemata.

No a prioriinformation about (some of) these schemata.

How to know the relationshipsbetween these schemata, by just looking at the instances?

Other way to see this problem: Match operator on schema mappings, in the setting ofdata exchange.

(5)

Motivation

Context

Multiple data sources containing information about similar entities, with someredundancy (e.g., sources of the deep Web).

Several different ways to present this information, i.e., several different schemata.

No a prioriinformation about (some of) these schemata.

How to know the relationshipsbetween these schemata, by just looking at the instances?

Other way to see this problem: Match operator on schema mappings, in the setting ofdata exchange.

(6)

Motivation

Context

Multiple data sources containing information about similar entities, with someredundancy (e.g., sources of the deep Web).

Several different ways to present this information, i.e., several different schemata.

No a prioriinformation about (some of) these schemata.

How to know the relationshipsbetween these schemata, by just looking at the instances?

Other way to see this problem: Match operator on schema mappings, in the setting ofdata exchange.

(7)

Problem definition

Problem

Given two (relational) database instances I and J with different schemata, what is the optimal description of J knowing I (with a finite set of formulas in some logical language)?

What does optimal implies:

Conciseness of description.

Validity of facts predicted byI and . All facts ofJ explainedby I and .

(Note the asymmetry between I and J; context ofdata exchange where J is computed fromI and ).

(8)

Problem definition

Problem

Given two (relational) database instances I and J with different schemata, what is the optimal description of J knowing I (with a finite set of formulas in some logical language)?

What does optimal implies:

Conciseness of description.

Validity of facts predicted byI and . All facts ofJ explainedby I and .

(Note the asymmetry between I and J; context ofdata exchange where J is computed fromI and ).

(9)

Outline

(10)

Source-to-target tuple-generating dependencies

Definition (Source-to-target tgd) First-order formula of the form:

8x'(x) ! 9y (x;y) with:

'conjunctionof source relation atoms;

conjunctionof target relation atoms;

all variables ofx bound in'.

Example

8x18x2R1(x1;x2) ^R2(x2) ! 9y R0(x1;y)

(11)

Particular tgds

We consider two ways of having simplertgds:

Disallow existential quantifiers on the right hand-side: full tgds.

Disallow cycles on both left- and right-hand sides: acyclic tgds.

(Classical notion of acyclicity on hypergraphs extending the basic notion of acyclicity on graphs.)

Examples

8x18x28x3R1(x1;x2) ^R2(x2;x3) ^R3(x3;x1) !R0(x1)iscyclic(and full).

8x18x28x3R1(x1;x2) ^R2(x2;x3) !R0(x1)isacyclic(and full).

We then consider the languages:

Ltgd: arbitrary source-to-target tgds;

Lfull: full tgds;

Lacyc: acyclic tgds;

Lfacyc: full and acyclic tgds.

(12)

Particular tgds

We consider two ways of having simplertgds:

Disallow existential quantifiers on the right hand-side: full tgds.

Disallow cycles on both left- and right-hand sides: acyclic tgds.

(Classical notion of acyclicity on hypergraphs extending the basic notion of acyclicity on graphs.)

Examples

8x18x28x3R1(x1;x2) ^R2(x2;x3) ^R3(x3;x1) !R0(x1)iscyclic(and full).

8x18x28x3R1(x1;x2) ^R2(x2;x3) !R0(x1)isacyclic(and full).

We then consider the languages:

Ltgd: arbitrary source-to-target tgds;

Lfull: full tgds;

Lacyc: acyclic tgds;

Lfacyc: full and acyclic tgds.

(13)

Particular tgds

We consider two ways of having simplertgds:

Disallow existential quantifiers on the right hand-side: full tgds.

Disallow cycles on both left- and right-hand sides: acyclic tgds.

(Classical notion of acyclicity on hypergraphs extending the basic notion of acyclicity on graphs.)

Examples

8x18x28x3R1(x1;x2) ^R2(x2;x3) ^R3(x3;x1) !R0(x1)iscyclic(and full).

8x18x28x3R1(x1;x2) ^R2(x2;x3) !R0(x1)isacyclic(and full).

We then consider the languages:

Ltgd: arbitrary source-to-target tgds;

Lfull: full tgds;

Lacyc: acyclic tgds;

Lfacyc: full and acyclic tgds.

(14)

How to define the pertinence of a set of tgds?

Example

R R0

a b c d

a a b b c a d d g h 0 = ?

1 = f8x R(x) !R0(x;x)g 2 = f8x R(x) ! 9y R0(x;y)g 3 = f8x8y R(x) ^R(y) !R0(x;y)g 4 = f9x9y R0(x;y)g

(15)

How to define the pertinence of a set of tgds?

Example

R R0

a b c d

a a b b c a d d g h 0 = ?

1 = f8x R(x) !R0(x;x)g 2 = f8x R(x) ! 9y R0(x;y)g 3 = f8x8y R(x) ^R(y) !R0(x;y)g 4 = f9x9y R0(x;y)g

(16)

Idea

Size of a formula: number of occurrences of variables and constants.

Costof a schema mapping : Size of theminimum repairof that is valid and explains all facts of J.

Types of repairs considered:

“fix” a universal quantifier by adding conditions (x =a or x 6=a);

“fix” an existential quantifier by giving corresponding constants ((x) !y=a with a conjunction of conditions on universally quantified variables);

addground factsto the target instance.

The problem is then to find a schema mapping ofminimal cost.

(17)

Example of cost computation

Example

R R0

a b c d

a a b b c a d d g h 8x R(x) !R0(x;x)

Cost: 17

PredictedR0 a a b b c c d d

(18)

Example of cost computation

Example

R R0

a b c d

a a b b c a d d g h 8x R(x)^x 6=c !R0(x;x)

Cost: 17

PredictedR0 a a b b d d

(19)

Example of cost computation

Example

R R0

a b c d

a a b b c a d d g h 8x R(x)^x 6=c !R0(x;x)

R(c;a)

R(g;h) Cost: 17

PredictedR0 a a b b c a d d

(20)

Example of cost computation

Example

R R0

a b c d

a a b b c a d d g h 8x R(x)^x 6=c !R0(x;x)

R(c;a) R(g;h)

Cost: 17

PredictedR0 a a b b c c d d g h

(21)

Example of cost computation

Example

R R0

a b c d

a a b b c a d d g h 8x R(x)^x 6=c !R0(x;x)

9x9y R(x;y) ^x =c^y =a 9x9y R(x;y) ^x =g^y=h

Cost: 17

PredictedR0 a a b b c c d d g h

(22)

Example of cost computation

Example

R R0

a b c d

a a b b c a d d g h 8x R(x) ^x 6=c !R0(x;x)

9x9y R(x;y) ^x =c^y =a 9x9y R(x;y) ^x =g^y=h

Cost: 17

PredictedR0 a a b b c c d d g h

(23)

Problems considered

Decision problemsof interest:

Cost : Is the cost of a given schema mapping less thanK? Optimality : Is a given schema mapping optimal?

Complexity? Algorithms?

(24)

Problems considered

Decision problemsof interest:

Cost : Is the cost of a given schema mapping less thanK? Optimality : Is a given schema mapping optimal?

Complexity? Algorithms?

(25)

Outline

(26)

Behavior for simple operators

Consider the elementary operatorsof the relational algebra:

Projection Intersection

Selection (conjunction of atomic conditions) Cross Product

Join (on a given attribute) Theorem

For any elementary operator , the tgd naturally associated with is optimal with respect to (I; (I)) (or ((J);J)), under some basic assumptions.

(27)

Behavior for simple operators

Consider the elementary operatorsof the relational algebra:

Projection Intersection

Selection (conjunction of atomic conditions) Cross Product

Join (on a given attribute) Theorem

For any elementary operator , the tgd naturally associated with is optimal with respect to (I; (I)) (or ((J);J)), under some basic assumptions.

(28)

Examples of naturally associated tgds

Examples

Condition I andJ Optimal tgd

Projection

I 6= ? J= 1(I) R(x;y) !R0(x) 1(J) \ 2(J) = ?,

j1(J)j >2 I = 1(J) R(x) ! 9y R0(x;y) Selection j'(I)j >size(')+3 2 J= '(I) R(x) !R0(x)

'(J) 6= ? I = '(J) R(x) !R0(x) Product R1I6= ?,RI26= ? J=RI1RI2 R1(x) ^R2(y) !R0(x;y)

R01

J6= ?,R02

J 6= ? I =R10 JR02

J R(x;y) !R01(x) ^R20(y)

(29)

(Combined) Complexity Results

Ltgd Lfull

Cost P3,P2-hard P2, (co)NP-hard Optimality P4, (co)NP-hard P3, (co)NP-hard

Lacyc Lfacyc

Cost P2, (co)NP-hard NP-complete Optimality P3, (co)NP-hard P2, (co)NP-hard

(30)

(Combined) Complexity Results

Ltgd Lfull

Cost P3,P2-hard P2, (co)NP-hard Optimality P4, (co)NP-hard P3, (co)NP-hard

Lacyc Lfacyc

Cost P2, (co)NP-hard NP-complete Optimality P3, (co)NP-hard P2, (co)NP-hard

(31)

(Combined) Complexity Results

Ltgd Lfull

Cost P3,P2-hard P2, (co)NP-hard Optimality P4, (co)NP-hard P3, (co)NP-hard

Lacyc Lfacyc

Cost P2, (co)NP-hard NP-complete Optimality P3, (co)NP-hard P2, (co)NP-hard

(32)

(Combined) Complexity Results

Ltgd Lfull

Cost P3,P2-hard P2, (co)NP-hard Optimality P4, (co)NP-hard P3, (co)NP-hard

Lacyc Lfacyc

Cost P2, (co)NP-hard NP-complete Optimality P3, (co)NP-hard P2, (co)NP-hard

(33)

(Combined) Complexity Results

Ltgd Lfull

Cost P3,P2-hard P2, (co)NP-hard Optimality P4, (co)NP-hard P3, (co)NP-hard

Lacyc Lfacyc

Cost P2, (co)NP-hard NP-complete Optimality P3, (co)NP-hard P2, (co)NP-hard

(34)

Vertex-Cover in r -partite r -uniform hypergraph

Vertex-Cover: find a set of vertices of minimal size that cover all (hyper)edges in a (hyper)graph.

NP-complete for general (hyper)graphs.

PTIME for bipartite graphs (Kőnig’s theorem).

Lemma

Vertex-Cover is NP-complete for r -partite r -uniform hypergraphs for r >3.

r-partite: partition of the set of vertices intor sets, with no hyperedge spanning vertices of two different sets.

r-uniform: every hyperedge spansr vertices.

(35)

Encoding of 3-SAT

x1

x1

x2

x2

x3

x3

y1

y1

y2

y2

y3

y3

z1

z1 z2

z2

z3

z3

:z _x _y

(36)

Cost is NP-hard for L

facyc

Reduction from Vertex-Cover in 3-partite 3-uniform hypergraphs.

Withoutx =a repairs on the left-hand side of a tgd:

R(x1;x2;x3) !R0(x1) Source instance: hypergraph Target instance: empty

Cost: size of the tgd plus twice the minimum size of a vertex cover.

With x =a repairs: a little more difficult, but feasible!

(37)

Cost is NP-hard for L

facyc

Reduction from Vertex-Cover in 3-partite 3-uniform hypergraphs.

Withoutx =a repairs on the left-hand side of a tgd:

R(x1;x2;x3) !R0(x1) Source instance: hypergraph Target instance: empty

Cost: size of the tgd plus twice the minimum size of a vertex cover.

With x =a repairs: a little more difficult, but feasible!

(38)

Cost is NP-hard for L

facyc

Reduction from Vertex-Cover in 3-partite 3-uniform hypergraphs.

Withoutx =a repairs on the left-hand side of a tgd:

R(x1;x2;x3) !R0(x1) Source instance: hypergraph Target instance: empty

Cost: size of the tgd plus twice the minimum size of a vertex cover.

With x =a repairs: a little more difficult, but feasible!

(39)

Cost is NP-hard for L

facyc

Reduction from Vertex-Cover in 3-partite 3-uniform hypergraphs.

Withoutx =a repairs on the left-hand side of a tgd:

R(x1;x2;x3) !R0(x1) Source instance: hypergraph Target instance: empty

Cost: size of the tgd plus twice the minimum size of a vertex cover.

With x =a repairs: a little more difficult, but feasible!

(40)

Outline

(41)

Extension to Relational Calculus

Definition of repairs can be extended to relational calculus.

Same definition of cost, optimality.

Costis not recursive (but co-r.e.).

Computability ofOptimality: open(!).

(42)

Other Cost Functions

Why not counting the number of tuples to add or remove in J? . . . because it can beexponential in the size of the schema mapping!

Why not counting the number of tuples to add or remove in I orJ? . . . because selections are not captured!

(43)

Other Cost Functions

Why not counting the number of tuples to add or remove in J? . . . because it can beexponential in the size of the schema mapping!

Why not counting the number of tuples to add or remove in I orJ? . . . because selections are not captured!

(44)

Other Cost Functions

Why not counting the number of tuples to add or remove in J? . . . because it can beexponential in the size of the schema mapping!

Why not counting the number of tuples to add or remove in I orJ? . . . because selections are not captured!

(45)

Other Cost Functions

Why not counting the number of tuples to add or remove in J? . . . because it can beexponential in the size of the schema mapping!

Why not counting the number of tuples to add or remove in I orJ? . . . because selections are not captured!

(46)

Outline

(47)

In summary...

Formal framework for the discovery ofsymbolic relations between two data sources.

High complexity(up to fourth level of PH).

Link with Inductive Logic Programming?

Heuristics?

Generalization of acyclicity?

(48)

In summary...

Formal framework for the discovery ofsymbolic relations between two data sources.

High complexity(up to fourth level of PH).

Link with Inductive Logic Programming?

Heuristics?

Generalization of acyclicity?

(49)

Merci.

Références

Documents relatifs

⊓ ⊔ Since every mapping given by st-tgds is total and has a maximum recovery [4], from Theorem 3 we obtain that for mappings specified by st-tgds the intersection (w.r.t. the class

In this approach, a first order logic specification, called schema mapping, describes declaratively how data structured under one schema (the source schema) are to be transformed

be further noted that, unlike all other approaches, paris did not even know that the relations and classes were identical, but discovered the class and relation equivalences by

To define in a formal way our notion of optimality of a schema mapping, the basic idea is to get the simultaneous optimal for all three factors of interest (validity, explanation of

Ontology Matching Probabilistic Model Beyond PARIS: Joins Conclusion...

COROLLARY (Reduction to Banach spaces). Then f is real analytic if and only if the restriction f'.Es~_UNEs--~R is real analytic for all bounded absolutely convex

We introduce a general data exchange (GDE) setting that extends DE settings to allow collaboration at the instance level, using a mapping table M , that specifies for each

In this paper, we investigate the problem of data exchange in a heterogeneous setting, where the source is a relational database, the target is a graph database, and the schema