40
Informationsintegration Schema Matching 10.1.2006 Felix Naumann

Informationsintegration Schema Matching 10.1.2006 Felix Naumann

Embed Size (px)

Citation preview

Page 1: Informationsintegration Schema Matching 10.1.2006 Felix Naumann

Informationsintegration

Schema Matching

10.1.2006

Felix Naumann

Page 2: Informationsintegration Schema Matching 10.1.2006 Felix Naumann

10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 2

Überblick

Klassifikation von Schema Matching Methoden [RB01] Label-basiert Instanz-basiert Struktur-basiert Mischformen

Globales Matching Stable Marriage

Page 3: Informationsintegration Schema Matching 10.1.2006 Felix Naumann

10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 3

Wdh: Schema Mapping im Kontext

1. Schema Matching &

Korrespondenzen

2. Schema Mapping

3. Mapping Interpretation

4. Daten-transformation

Page 4: Informationsintegration Schema Matching 10.1.2006 Felix Naumann

10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 4

Schema Matching – Motivation

Große Schemas > 100 Tabellen, viele

Attribute Bildschirm nicht lang genug

Unübersichtliche Schemas Tiefe Schachtelungen Fremdschlüssel Bildschirm nicht breit genug XML Schema

Fremde Schemas Unbekannte Synonyme

Irreführende Schemas Unbekannte Homonyme

Fremdsprachliche Schemas Kryptische Schemas

|Attributnamen| 8 Zeichen

|Tabellennamen| 8 Zeichen

Page 5: Informationsintegration Schema Matching 10.1.2006 Felix Naumann

10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 5

Man beachte die Scrollbar!

Man beachte die Schachtelungstiefe!

Page 6: Informationsintegration Schema Matching 10.1.2006 Felix Naumann

10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 6

Schema Matching – Motivation

Die Folgen Falsche Korrespondenzen (false positives) Fehlende Korrespondenzen (false negatives) Frustration

User verlieren sich im Schema User verstehen Semantik der Schemas nicht

Page 7: Informationsintegration Schema Matching 10.1.2006 Felix Naumann

10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 7

Schema Matching Klassifikation nach [RB01]

Page 8: Informationsintegration Schema Matching 10.1.2006 Felix Naumann

10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 8

Schema Matching Klassifikation

Schema Matching basierend auf Namen der Schemaelemente (label-based) Darunterliegende Daten (instance-based) Struktur des Schemas (structure-based) Mischformen

Page 9: Informationsintegration Schema Matching 10.1.2006 Felix Naumann

10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 9

Schema Matching – Label-based Gegeben zwei Schemata mit Attributmengen A und B Kernidee:

Bilde Kreuzprodukt aller Attribute aus A und B. Für jedes Paar vergleiche Ähnlichkeit bezgl. Attributnamen

(Label). Z.B. Edit-distance

Ähnlichste Paare sind Matches Probleme:

Effizienz Auswahl der besten Matches (globales Matching)

Iterativ? Stable Marriage?

Synonyme und Homonyme werden nicht erkannt

Page 10: Informationsintegration Schema Matching 10.1.2006 Felix Naumann

10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 10

Schema Matching – Label-based

Stand der Technik in kommerziellen Produkten Label-based Namensgleichheit Kein globales Matching Keine Ähnlichkeitsmaße Kein Instanz-basiertes Matching

Page 11: Informationsintegration Schema Matching 10.1.2006 Felix Naumann

10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 11

Schema Matching – Instance-based Gegeben zwei Schemata mit Attributmengen A und B, jeweils mit

darunterliegenden Daten. Kernidee

Für jedes Attribute extrahiere interessante Eigenschaften der Daten Buchstabenverteilung, Länge, etc.

Bilde Kreuzprodukt aller Attribute aus A und B. Für jedes Paar vergleiche Ähnlichkeit bzgl. der Eigenschaften

Probleme Auswahl der Eigenschaften Datenmenge: Sampling Vergleichsmethode, z.B. Naive Bayes Gewichtung (Maschinelles Lernen)

Page 12: Informationsintegration Schema Matching 10.1.2006 Felix Naumann

10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 12

Instance-based Schema Matching Instance-based Schema Matching:

Correspondences based on similar data values or their properties

Conventional solution: Vertical Comparison of columns = Attribute classification [ICDE‘02]

Our solution: Horizontal Comparison of rows = Duplicate detection (despite missing

attribute correspondences) [ICDE‘05]

Page 13: Informationsintegration Schema Matching 10.1.2006 Felix Naumann

10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 13

Duplicate-driven Schema Matching

A B C D E

Max Michel m 601- 4839204 601- 4839204

... ... ... ... ...

B‘ F E‘ G

Michel maxm 601- 4839204 UNIX

... ... ... ...

Temporary matching A B‘ B F C E‘ D G E

??

Page 14: Informationsintegration Schema Matching 10.1.2006 Felix Naumann

10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 14

Duplicate-driven Schema Matching

A B C D E

Max Michel m 601- 4839204 601- 4839204

Sam Adams m 541- 8127100 541- 8121164

B‘ F E‘ G

Michel maxm 601- 4839204 UNIX

Adams beer 541- 8127164 WinXP

Temporary matching A B‘ B F C E‘ D G E

??? ?

Assumptions There is data in both DBs. There are (at least a few) duplicates in both DBs. Equal or similar values reflect same semantics of attributes.

Page 15: Informationsintegration Schema Matching 10.1.2006 Felix Naumann

10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 15

Duplicate-driven Schema Matching

1. Duplicate detection Goal: Find the top-k duplicates. Problems

Correspondences unknown Possibly small intensional overlap

2. Schema Matching Goal: Derive attribute correspondences from attribute

values. Problems

Attribute values only similar, not equal Synonyms and homonyms in values

Page 16: Informationsintegration Schema Matching 10.1.2006 Felix Naumann

10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 16

)1log()1log(),( , t

tr df

Ntftrw

Duplicate Detection in Unaligned Tables

Cosine measure with TFIDF weights Tuple as vector of term weights Term weights is high if term

appears often in tuple (TF) and it appears in only few tuples (IDF).

Tuple similarity is the cosine of the angle of both (normalized) vectors.

srt

tswtrwsrtsim ),(),(),(

„1“„123“„Max“„601“

:

00.210.30.14:

0.060

0.280.16:

123 Max Michel

[email protected]

601- 4839204

601- 4839204

1 Max Michel 601- 4839204 [email protected]

Page 17: Informationsintegration Schema Matching 10.1.2006 Felix Naumann

10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 17

Schema Matching

Given the top K duplicates. Find a (global) matching

I.e., each attribute has 0 or 1 correspondence.

Temporary matching A B‘ B F C E‘ D G E

Formalized by similarity matrix

A B C D E

B‘ 0.22 0.92 0.07 0 0

F 0.60 0.60 0.07 0 0

E‘ 0 0 0 0.58 0.64

G 0 0.07 0 0.07 0.02

Average SoftTFIDF

Page 18: Informationsintegration Schema Matching 10.1.2006 Felix Naumann

10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 18

2. Schema Matching – Similarity Measure

Fieldwise Comparison Compare attribute values of record pairs.

Similarity measure: Edit-distance vs. SoftTFIDF

Edit distance Minimal number of edit operations (substitute, insert, delete);

several variations exist

SoftTFIDF ‘Soft’ variation of TFIDF that also considers similar terms

srt

tswtrwsrtfidf ),(),(),(

),,(

)',()',(),(),(srCLOSUREt

ttsimtswtrwsrtfidfsoft

Page 19: Informationsintegration Schema Matching 10.1.2006 Felix Naumann

10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 19

Graph Matching

Given: Similarity matrix = weighted bipartite graph

Find: Maximal weight matching Alternative: Matching with

stable marriage property Outlook

Produce mappings and not just correspondences

0.640.58000E‘

000.070.600.60F

G

B‘

0.020.0700.070

EDCBA000.070.920.22

Page 20: Informationsintegration Schema Matching 10.1.2006 Felix Naumann

10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 20

Schema Matching – Structure-based

Gegeben zwei Schemata mit Elementmengen A und B.

Kernidee Nutze (komplexe) Struktur des Schemas aus. Hierarchieebene Elementtyp (Attribut, Relation, ...) Nachbarschaftsbeziehungen

Page 21: Informationsintegration Schema Matching 10.1.2006 Felix Naumann

10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 21

Schema Matching – Structure-based Beispiel: Similarity Flooding nach [MGMR02]

Gegeben initiale Ähnlichkeit zwischen Schemaelementen (z.B. durch edit-distance oder durch Analyse der darunterliegenden Daten)

Lasse Ähnlichkeiten „abfärben“ auf die Nachbarn Nachbarn sind durch Struktur definiert Sind alle Nachbarn von x und y ähnlich zueinander, sind (vielleicht) auch x

und y ein match. Analogie: Man „flutet“ das Netzwerk der Ähnlichkeiten bis ein Gleichgewicht

erreicht ist.

Page 22: Informationsintegration Schema Matching 10.1.2006 Felix Naumann

10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 22

Schema Matching – Mischformen

Hybrid Gleichzeitige Anwendung mehrerer Techniken Bsp: Instance-based + Datentypvergleich

Composite Repertoire bekannter Techniken (inkl. hybrider Techniken) Kombination dieser unabhängigen Verfahren Bsp: Durch Gewichtung Bsp: Durch automatisches Lernen

Des besten Verfahrens Einer guten Gewichtung

Page 23: Informationsintegration Schema Matching 10.1.2006 Felix Naumann

10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 23

Schema Matching in Clio

Page 24: Informationsintegration Schema Matching 10.1.2006 Felix Naumann

10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 24

Schema Matching – Weitere Anwendungen

Herkömmlich: Korrespondenzen finden Schlüssel – Fremdschlüssel finden

Ähnliche Attribute innerhalb eines Schemas sind gute Kandidaten

Höher-stufige Korrespondenzen finden Ähnlichkeiten von Tabellen durch Aggregation der

Matches ihrer Attribute

Page 25: Informationsintegration Schema Matching 10.1.2006 Felix Naumann

10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 25

Schema Matching – Erweiterungen

1:n, n:1 matches Vorname, Nachname Name

Viele Kombinationsmöglichkeiten Viele Funktionen denkbar: Mathematische Operatoren,

Konkatenation, etc. Name Vorname, Nachname

Viele Kombinationsmöglichkeiten Parsingregeln finden!

Global matching Matche nicht nur einzelne Attribute (oder Attributmengen) Sondern komplette Tabellen oder komplette Schemata Stable Marriage Problem

Page 26: Informationsintegration Schema Matching 10.1.2006 Felix Naumann

10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 26

Schema Matching – Erweiterungen

n:1 und 1:n Matches Viele Kombinationsmöglichkeiten Viele Funktionen denkbar Parsingregeln

Matching in komplexen Schemata Ziel: Finde Mapping, nicht

Korrespondenzen

Globales Matching Matche Tabellen und Schemata, nicht

nur Attribute Stable Marriage bzw. Maximum

Weighted Matching

Vorname NameNachname

VornameNameNachname

A C

B D

1.00.81 0.54

0.27

Page 27: Informationsintegration Schema Matching 10.1.2006 Felix Naumann

10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 27

Überblick

Klassifikation von Schema Matching Methoden [RB01] Label-basiert Instanz-basiert Struktur-basiert Mischformen

Globales Matching Stable Marriage

Page 28: Informationsintegration Schema Matching 10.1.2006 Felix Naumann

10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 28

Schema Matching – Stable Marriage Gegeben

n Frauen (Attribute in Schema A) und m Männer (Attribute in Schema B)

Monogamie Je eine Frau kann nur mit je einem Mann verheiratet sein (nur

1:1 matches) Jede Frau hat eine Rangliste der Männer und umgekehrt

Bei Schema Matching Attribut-Ähnlichkeit gemäß eines der vorigen Verfahren Rangliste ist (normalerweise) symmetrisch

Gesucht: Paarung (globales Matching), so dass niemals gilt f1 heiratet m1, f2 heiratet m2, aber f1 bevorzugt m2 und m2 bevorzugt f1 (Instabil!)

Page 29: Informationsintegration Schema Matching 10.1.2006 Felix Naumann

10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 29

Stable Marriage – Beispiel Männer (1-4) Frauen (A-D) 1: B, D, A, C A: 2, 1, 4, 3 2: C, A, D, B B: 4, 3, 1, 2 3: B, C, A, D C: 1, 4, 3, 2 4: D, A, C, B D: 2, 1, 4, 3

Beispiel aus: David Toth, "The Stable Marriage Problem: More Marital Happiness than Reality TV" April 25, 2003, Connecticut College, New London, CT, USA,

Page 30: Informationsintegration Schema Matching 10.1.2006 Felix Naumann

10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 30

Stable Marriage – Beispiel

Männer (1-4) Frauen (A-D) 1: B, D, A, C A: 2, 1, 4, 3 2: C, A, D, B B: 4, 3, 1, 2 3: B, C, A, D C: 1, 4, 3, 2 4: D, A, C, B D: 2, 1, 4, 3

1 stellt Antrag an B, sie willigt ein: (1, B)

Page 31: Informationsintegration Schema Matching 10.1.2006 Felix Naumann

10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 31

Stable Marriage – Beispiel

Männer (1-4) Frauen (A-D) 1: B, D, A, C A: 2, 1, 4, 3 2: C, A, D, B B: 4, 3, 1, 2 3: B, C, A, D C: 1, 4, 3, 2 4: D, A, C, B D: 2, 1, 4, 3

1 stellt Antrag an B, sie willigt ein: (1, B) 2 stellt Antrag an C, sie willigt ein: (1, B) (2, C)

Page 32: Informationsintegration Schema Matching 10.1.2006 Felix Naumann

10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 32

Stable Marriage – Beispiel

Männer (1-4) Frauen (A-D) 1: B, D, A, C A: 2, 1, 4, 3 2: C, A, D, B B: 4, 3, 1, 2 3: B, C, A, D C: 1, 4, 3, 2 4: D, A, C, B D: 2, 1, 4, 3

1 stellt Antrag an B, sie willigt ein: (1, B) 2 stellt Antrag an C, sie willigt ein: (1, B) (2, C) 3 stellt Antrag an B, sie willigt ein & verlässt 1: (2, C) (3, B)

Page 33: Informationsintegration Schema Matching 10.1.2006 Felix Naumann

10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 33

Stable Marriage – Beispiel

Männer (1-4) Frauen (A-D) 1: B, D, A, C A: 2, 1, 4, 3 2: C, A, D, B B: 4, 3, 1, 2 3: B, C, A, D C: 1, 4, 3, 2 4: D, A, C, B D: 2, 1, 4, 3

1 stellt Antrag an B, sie willigt ein : (1, B) 2 stellt Antrag an C, sie willigt ein : (1, B) (2, C) 3 stellt Antrag an B, sie willigt ein & verlässt 1: (2, C) (3, B) 1 stellt Antrag an D, sie willigt ein : (1, D) (2, C) (3, B)

Page 34: Informationsintegration Schema Matching 10.1.2006 Felix Naumann

10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 34

Stable Marriage – Beispiel Männer (1-4) Frauen (A-D) 1: B, D, A, C A: 2, 1, 4, 3 2: C, A, D, B B: 4, 3, 1, 2 3: B, C, A, D C: 1, 4, 3, 2 4: D, A, C, B D: 2, 1, 4, 3

1 stellt Antrag an B, sie willigt ein : (1, B) 2 stellt Antrag an C, sie willigt ein : (1, B) (2, C) 3 stellt Antrag an B, sie willigt ein & verlässt 1: (2, C) (3, B) 1 stellt Antrag an D, sie willigt ein : (1, D) (2, C) (3, B) 4 stellt Antrag an D, sie lehnt ab : (1, D) (2, C) (3, B)

Page 35: Informationsintegration Schema Matching 10.1.2006 Felix Naumann

10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 35

Stable Marriage – Beispiel Männer (1-4) Frauen (A-D) 1: B, D, A, C A: 2, 1, 4, 3 2: C, A, D, B B: 4, 3, 1, 2 3: B, C, A, D C: 1, 4, 3, 2 4: D, A, C, B D: 2, 1, 4, 3

1 stellt Antrag an B, sie willigt ein : (1, B) 2 stellt Antrag an C, sie willigt ein : (1, B) (2, C) 3 stellt Antrag an B, sie willigt ein & verlässt 1: (2, C) (3, B) 1 stellt Antrag an D, sie willigt ein : (1, D) (2, C) (3, B) 4 stellt Antrag an D, sie lehnt ab: (1, D) (2, C) (3, B) 4 stellt Antrag an A, sie willigt ein : (1, D) (2, C) (3, B) (4, A)

Page 36: Informationsintegration Schema Matching 10.1.2006 Felix Naumann

10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 36

Maximum Weighted Matching

Alternative zu Stable Marriage Suche matching mit maximalem Gewicht in

bipartiten Graphen Bipartit:

Knoten in zwei Klassen (Quelle & Ziel) Kanten nur zwischen Knoten verschiedener Klassen

(Korrespondenzen) Maximiere Summe der einzelnen

Gewichte/Ähnlichkeiten

Page 37: Informationsintegration Schema Matching 10.1.2006 Felix Naumann

10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 37

Diskussion: Globales Matching

Personal Name Telefon Alter Adresse Gehalt

Person Name Street ID Age Phone Kinderzahl0.1

0.9

0.6

1

0.8

Page 38: Informationsintegration Schema Matching 10.1.2006 Felix Naumann

10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 38

Diskussion: Globales Matching

Personal Name Telefon Alter Adresse Gehalt

Produkt Name Bezeichnung ID Gewicht Volumen Lagermenge0.1

0.9

0.2

0.3

0.01

Page 39: Informationsintegration Schema Matching 10.1.2006 Felix Naumann

10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 39

Zusammenfassung

Schema Matching basierend auf Namen der Schemaelemente (label-based) Darunterliegende Daten (instance-based) Struktur des Schemas (structure-based) Mischformen, Meta-Matcher

Globales Matching

Page 40: Informationsintegration Schema Matching 10.1.2006 Felix Naumann

10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 40

Literatur Artikel mit der Klassifikation:

[RB01] Erhard Rahm and Philip Bernstein, A survey of approaches to automatic schema matching, VLDB Journal 10(4), 2001.

Spezielle Algorithmen [MGMR02] Sergey Melnik, Hector Garcia-Molina,

Erhard Rahm: Similarity Flooding: A Versatile Graph Matching Algorithm and Its Application to Schema Matching. ICDE 2002: 117-128

[MH03] Jayant Madhavan, Alon Y. Halevy: Composing Mappings Among Data Sources. VLDB 2003: 572-583.

uvm.