Upload
wolfgang-stoiber
View
111
Download
1
Tags:
Embed Size (px)
Citation preview
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
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
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
10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 5
Man beachte die Scrollbar!
Man beachte die Schachtelungstiefe!
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
10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 7
Schema Matching Klassifikation nach [RB01]
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
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
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
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)
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]
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
??
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.
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
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
601- 4839204
601- 4839204
1 Max Michel 601- 4839204 [email protected]
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
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
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
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
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.
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
10.1.2006 Felix Naumann, VL Informationsintegration, WS 05/06 23
Schema Matching in Clio
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
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
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
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
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!)
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,
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)
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)
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)
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)
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)
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)
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
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
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
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
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.