Perm: efficient provenance support for relational databases

Perm: efficient provenance support for relational databases

phdthesis
Viele Anwendungsgebiete, wie zum Beispiel Wissenschaftliche Berechnungen, Data-Warehousing und Datenintegration, benötigen detaillierte Informationen über die Herkunft von Daten. Solche Informationen werden oft als Data Provenance bezeichnet. Die Herkunft eines so genannten Datenelements, beinhaltet Informationen über die Eingabedaten von denen das Datenelement abgeleitet wurde und die Transformationen die zu seiner Entstehung und aktuellen Darstellung beigetragen haben. Provenance für relationale Datenbanken ist sowohl theoretisch als auch in algorithmischer Hinsicht untersucht worden. Trotz der Fortschritte auf diesem Gebiet, muss ein Mangel an praktisch einsetzbaren Systemen konstatiert werden, die die Erzeugung und Speicherung von Provenance und Anfragen über solche Informationen unterst ützen (Im Folgenden bezeichnen wir solche Systeme als Provenance Management Systeme oder kurz PMS). Herkömmliche Systeme unterstützen nur Teilmengen der Sprachkonstrukte von SQL, was eine erhebliche Einschränkung der Praxis-Tauglichkeit dieser Systeme darstellt, da die meisten Anwendungsgebiete, die von Provenance Funktionalität profitieren, komplexe Anfragefunktionalität benötigen. Dazu gehören zum Beispiel geschachtelte Unter-Anfragen, Aggregation und vom Benutzer definierte Funktionen. Ein PMS, das diese Sprachkonstrukte nicht unterstützt, ist nur von sehr eingeschränktem Nutzen. Die meisten Ansätze benutzen unterschiedliche Datenmodelle zur Repräsentation von Provenance Informationen und der Daten für die Provenance berechnet wurde (normale Daten). Dies hat den unvermeidbaren Nachteil, das eine neue Anfragesprache entwickelt werden muss, um Provenance Daten abfragen zu können. Es ist nicht verwunderlich, das die Mächtigkeit und Reife solcher Sprachen nicht an die einer langzeitig entwickelten Anfragesprache wie SQL heranreicht. In dieser Dissertation stellen wir das innovative PMS Perm vor, das die oben genannten Nachteile von herkömmlichen Systemen behebt. Die dem Ansatz zugrundeliegende Idee ist es, Provenance Informationen als normale Relationen darzustellen, die mit Hilfe von Standard SQL Anfragen generiert und angefragt werden; ”Benutze SQL um die Provenance von SQL Anfragen zu berechnen und anzufragen”. Perm wurde basierend auf PostgreSQL umgesetzt und erweitert den SQL Dialekt dieses Systems mit neue Sprachkonstrukten für die Berechnung von Provenance. Diese Sprachkonstrukte sind intern als Anfragetransformationen (query rewrites) realisiert. Dieser Ansatz ermöglicht es Perm von dem fortschrittlichen Anfrageoptimierer von PostgreSQL zu profitieren und ermöglicht den Einsatz von SQL als Anfragesprache für Provenance Informationen. Die Umsetzung unserer Vision eines ”rein relationalen” PMS erfolgte in mehreren Schritten. Zunächst war die Entwicklung von neuen Provenance Definitionen notwendig, um SQL Konstrukte zu unterstützen, die von den Standard Provenance Definitionen nicht behandelt werden. Basierend auf diesen Definitionen haben wir Anfragetransformationen entwickelt, die eine Anfrage q in eine Anfrage überführen, die die Provenance von q berechnet. Diese Anfragetransformationen sind beweisbar korrekt und vollständig. Die Implementierung von Perm baut auf diesem soliden theoretischen Hintergrund auf. In der Implementierung werden neuartige Optimierungstechniken eingesetzt, um die Effizienz der inhärent aufwändigen Provenance Berechnung zu steigern. Der erfolgreiche Einsatz von Perm zur Fehlerdiagnose für Datenintegration - einem weit verbreiteten Einsatzgebiet von Provenance - und umfangreichen Experimente zur Analyse der Effizienz der Provenance Berechnung in Perm belegen die Vorteile unseres Systems gegenüber alternativen Ansätzen.
Boris Glavic
In many application areas like scientific computing, data-warehousing, and data integration detailed information about the origin of data is required. This kind of information is often referred to as data provenance. The provenance of a piece of data, a so-called data item, includes information about the source data from which it is derived and the transformations that lead to its creation and current representation. In the context of relational databases, provenance has been studied both from a theoretical and algorithmic perspective. Yet, in spite of the advances made, there are very few practical systems available that support generating, querying and storing provenance information (We refer to such systems as provenance management systems or PMS). These systems support only a subset of SQL, a severe limitation in practice since most of the application domains that benefit from provenance information use complex queries. Such queries typically involve nested sub-queries, aggregation and/or user defined functions. Without support for these constructs, a provenance management system is of limited use. Furthermore, existing approaches use different data models to represent provenance and the data for which provenance is computed (normal data). This has the intrinsic disadvantage that a new query language has to be developed for querying provenance information. Naturally, such a query language is not as powerful and mature as, e.g., SQL. In this thesis we present Perm, a novel relational provenance management system that addresses the shortcoming of existing approaches discussed above. The underlying idea of Perm is to represent provenance information as standard relations and to generate and query it using standard SQL queries; ”Use SQL to compute and query the provenance of SQL queries”. Perm is implemented on top of PostgreSQL extending its SQL dialect with provenance features that are implemented as query rewrites. This approach enables the system to take full benefit from the advanced query optimizer of PostgreSQL and provide full SQL query support for provenance information. Several important steps were necessary to realize our vision of a ”purely relational” provenance management system that is capable of generating provenance information for complex SQL queries. We developed new notions of provenance that handle SQL constructs not covered by the standard definitions of provenance. Based on these provenance definitions rewrite rules for relational algebra expressions are defined for transforming an algebra expression q into an algebra expression that computes the provenance of q (These rewrites rules are proven to produce correct and complete results). The implementation of Perm, based on this solid theoretical foundation, applies a variety of novel optimization techniques that reduce the cost of some intrinsically expensive provenance operations. By applying the Perm system to schema mapping debugging - a prominent use case for provenance - and extensive performance measurements we confirm the feasibility of our approach and the superiority of Perm over alternative approaches. iii
Perm: efficient provenance support for relational databases
2010
04
University of Zurich, Department of Informatics
dbtg