Maintenance of Materialized Views: Problems, Techniques, and Applications Ashish Gupta IBM almaden Research Center Inderpal Singh Mumick AT&T Bell Laboratories.

Slides:



Advertisements
Similar presentations
DB glossary (focus on typical SQL RDBMS, not XQuery or SPARQL)
Advertisements

SQL: The Query Language Part 2
Union, Intersection, Difference (subquery) UNION (subquery) produces the union of the two relations. Similarly for INTERSECT, EXCEPT = intersection and.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 5 More SQL: Complex Queries, Triggers, Views, and Schema Modification.
Outline  Introduction  Background  Distributed DBMS Architecture  Distributed Database Design  Semantic Data Control ➠ View Management ➠ Data Security.
Query Optimization CS634 Lecture 12, Mar 12, 2014 Slides based on “Database Management Systems” 3 rd ed, Ramakrishnan and Gehrke.
Fast Incremental Maintenance of Approximate histograms : Phillip B. Gibbons (Intel Research Pittsburgh) Yossi Matias (Tel Aviv University) Viswanath Poosala.
Incremental Maintenance for Materialized Views over Semistructured Data Written By: Serge Abiteboul Jason McHuge Michael Rys Vasilis Vassalos Janet L.
COMP 3715 Spring 05. Working with data in a DBMS Any database system must allow user to  Define data Relations Attributes Constraints  Manipulate data.
CIT 613: Relational Database Development using SQL Introduction to SQL.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 5 More SQL: Complex Queries, Triggers, Views, and Schema Modification.
Incremental Maintenance for Non-Distributive Aggregate Functions work done at IBM Almaden Research Center Themis Palpanas (U of Toronto) Richard Sidle.
CMSC424, Spring 2005 CMSC424: Database Design Lecture 5.
The Relational Model System Development Life Cycle Normalisation
Chapter Information Systems Database Management.
Normalization DB Tuning CS186 Final Review Session.
12.5 Record Modifications Jayalakshmi Jagadeesan Id 106.
Ling Wang, Mukesh Mulchandani Advisor: Elke A. Rundensteiner Rainbow Research group, DSRG, WPI Updating XQuery Views over Relational Data.
Temple University – CIS Dept. CIS331– Principles of Database Systems V. Megalooikonomou Query by example (based on notes by Silberchatz,Korth, and Sudarshan.
C++ Programming: Program Design Including Data Structures, Third Edition Chapter 17: Linked Lists.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 6 The Relational Algebra and Relational Calculus.
1 V iew Maintenance Based on several papers in view maintenance, most notably: A.Gupta and I.S. Mumick. Maintenance of Materialized Views: Problems, Techniques,
Introduction to Database Systems 1 Relational Algebra Relational Model: Topic 3.
Database Systems More SQL Database Design -- More SQL1.
CS405G: Introduction to Database Systems Final Review.
The Efficient Maintenance of Access Roles with Role Hiding Chaoyi Pang Xiuzhen Zhang
CS 405G: Introduction to Database Systems 16. Functional Dependency.
©Silberschatz, Korth and Sudarshan5.1Database System Concepts Chapter 5: Other Relational Languages Query-by-Example (QBE) Datalog.
Database Management Systems, 2 nd Edition. R. Ramakrishnan and J. Gehrke1 Data Warehousing and Decision Support Chapter 25, Part B.
Web-Enabled Decision Support Systems
Relational Query Languages. Languages of DBMS  Data Definition Language DDL  define the schema and storage stored in a Data Dictionary  Data Manipulation.
CSE314 Database Systems More SQL: Complex Queries, Triggers, Views, and Schema Modification Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson.
Query Optimization Arash Izadpanah. Introduction: What is Query Optimization? Query optimization is the process of selecting the most efficient query-evaluation.
NormalizationNormalization Chapter 4. Purpose of Normalization Normalization  A technique for producing a set of relations with desirable properties,
CSE314 Database Systems The Relational Algebra and Relational Calculus Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson Ed Slide Set.
1 The Relational Database Model. 2 Learning Objectives Terminology of relational model. How tables are used to represent data. Connection between mathematical.
9/7/2012ISC329 Isabelle Bichindaritz1 The Relational Database Model.
1 The Relational Model. 2 Why Study the Relational Model? v Most widely used model. – Vendors: IBM, Informix, Microsoft, Oracle, Sybase, etc. v “Legacy.
Tutorial 6 SQL Muhammad Sulayman
©Silberschatz, Korth and Sudarshan5.1Database System Concepts Chapter 5: Other Relational Languages Query-by-Example (QBE)
Unit III. Views A table that is derived from other tables Considered as a virtual table Does not store data.
Chapter 9 Structured Query Language David M. Kroenke Database Processing © 2000 Prentice Hall.
3 / 12 Databases MIS105 Lec13 Irfan Ahmed Ilyas CHAPTER Prepared By:
Creating and Maintaining Geographic Databases. Outline Definitions Characteristics of DBMS Types of database Relational model SQL Spatial databases.
Database Fundamental & Design by A.Surasit Samaisut Copyrights : All Rights Reserved.
Source: Database System Concepts, Silberschatz etc Edited: Wei-Pang Yang, IM.NDHU, Introduction to Database CHAPTER 5 Other Relational Languages.
Database Management Systems, R. Ramakrishnan and J. Gehrke1 Schema Refinement and Normal Forms Chapter 15.
Deductive Databases General idea: some relations are stored (extensional), others are defined by datalog queries (intensional). Many research projects.
CIT 613: Relational Database Development using SQL Introduction to SQL DeSiaMorePowered by DeSiaMore 1.
Foundations of Constraint Processing, Fall 2004 October 3, 2004Interchangeability in CSPs1 Foundations of Constraint Processing CSCE421/821, Fall 2004:
CS 405G: Introduction to Database Systems Instructor: Jinze Liu Fall 2009.
Lu Chaojun, SJTU 1 Extended Relational Algebra. Bag Semantics A relation (in SQL, at least) is really a bag (or multiset). –It may contain the same tuple.
Database Management COP4540, SCS, FIU Database Trigger.
7 1 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 7.6 Advanced Select Queries SQL provides useful functions that.
Normalization and FUNctional Dependencies. Redundancy: root of several problems with relational schemas: –redundant storage, insert/delete/update anomalies.
SQL: Interactive Queries (2) Prof. Weining Zhang Cs.utsa.edu.
Copyright © 2004 Pearson Education, Inc.. Chapter 24 Enhanced Data Models for Advanced Applications.
Chapter 14 Functional Dependencies and Normalization Informal Design Guidelines for Relational Databases –Semantics of the Relation Attributes –Redundant.
More SQL: Complex Queries, Triggers, Views, and Schema Modification
Structured Query Language
Quiz Questions Q.1 An entity set that does not have sufficient attributes to form a primary key is a (A) strong entity set. (B) weak entity set. (C) simple.
Principles of GIS Fundamental database concepts Shaowen Wang
CS405G: Introduction to Database Systems
The Relational Model Textbook /7/2018.
Data Warehousing and Decision Support
Business Application Development
CMSC-461 Database Management Systems
Views 1.
Database SQL.
Presentation transcript:

Maintenance of Materialized Views: Problems, Techniques, and Applications Ashish Gupta IBM almaden Research Center Inderpal Singh Mumick AT&T Bell Laboratories iDB Lab., SNU Junseok Yang

Introduction [1/2] 1 DB Base Relations f View DB Base Relations f Materialized View Materialized View

Introduction [2/2]  View Maintenance? 2 DB Base Relations f Materialized View Modification View Maintenance  Incremental View Maintenance?  Compute changes to a view

Classification of the View Maintenance Problem [1/5]  If part(p1, 5000, c15) is inserted,  Materialized view alone is available  Base relation part alone is available  If part(p1, 2000, c12) is deleted,  There is no algorithm using only the materialized view. 3 part(part_no, part_cost, contract) expensive_parts(part_no) = ∏ part_no σ part_cost>1000 (part) Information Dimension

Classification of the View Maintenance Problem [2/5]  Insertion  Deletion  Update or Deletion followed by an Insertion 4 Modification Dimension

Classification of the View Maintenance Problem [3/5]  When insert part(p1, 5000, c15) and supp_parts does not contain p1, join makes it impossible to maintain supp_parts using the materialized view 5 supp(supp_no, part_no, price) supp_parts(part_no) = ∏ part_no (supp part_no part) Language Dimension

Classification of the View Maintenance Problem [4/5]  View supp_parts is maintainable if the view contains part_no p1 but not otherwise  The maintainability of a view depends on the particular instance of the database and the modification 6 Instance Dimension

Classification of the View Maintenance Problem [5/5] 7

The Idea Behind View Maintenance  Incremental maintenance 8 ab link(a, b) hop(X, Y) = ∏ X,Y (link(X, V) V=W link(W, Y)) ∆ (hop) = ∏ X,Y (( ∆ (link) V=W link(W, Y)) ∪ (link(X, V) V=W ∆ (link)(W, Y)) ∪ ( ∆ (link)(X, V) V=W ∆ (link)(W, Y))) czd hop(c, d) 12 3

Using Full Information [1/]  Nonrecursive Views  Counting Algorithm  Store duplicate count of each tuple in the view  Insertion +, Deletion - 9 CREATE VIEW hop(S, D) as (select distinct l1.S, l2.D from link l1, link l2 where l1.D = l2.S) a b cd e hop = {(a, c), (a, e)}

Using Full Information [2/]  Nonrecursive Views  Algebraic Differencing  The Ceri-Widom algorithm  Recursive Algorithms 10

Using Full Information [3/]  Outer-Join Views 11 CREATE view V as select X 1, …, X n from R full outer join S on g(Y 1, …, Y n ) R(X 1, …, X n ), S(Y 1, …, Y n ) select X 1, …, X n from ∆ (R) left outer join S on g(Y 1, …, Y n ) select X 1, …, X n from R’ right outer join ∆ (S) on g(Y 1, …, Y n )

Using Full Information [4/4]  Recursive Views  The Dred Algorithm  The PF (Propagation/Filtration) algorithm  The Kuchenhoff algorithm  The Urpi-Olive algorithm  Counting  Transitive Closures  Nontraditional Views 12

Using Partial Information [1/5]  A view is not always maintainable for a modification using only partial information  Even if the view can be maintained, it may also depend upon whether the modification is an insertion, deletion, or update  Checking whether the view can be maintained → How to maintain the view 13

Using Partial Information [2/5]  Using no Information: Query Independent of Update 14 Materialized View Base Relations Modification irrelevant? use other algorithm for maintenance

Using Partial Information [3/5]  Using the Materialized View: Self-Maintenance  Self-maintainable view is a view that can be maintained using only the materialized view and key constraints  Delete a tuple from relation part  Delete supp(s1, p1, 100) 15 part(part_no, part_cost, contract) expensive_parts(part_no) = ∏ part_no σ part_cost>1000 (part) supp(supp_no, part_no, price) supp_parts(part_no) = ∏ part_no (supp part_no part)

Using Partial Information [4/5]  Using Materialized View and Some Base Relations  Modified Relation is not Available (Chronicle Views) 16 Materialized View Base Relations … … … f Chronicle Relation (may not be stored)

Using Partial Information [5/5]  Using Materialized View and Some Base Relations  Only Modified Relation is Available (Change-reference Maintainable)  Delete a tuple from relation supp 17 supp(supp_no, part_no, price) supp_parts(part_no) = ∏ part_no (supp part_no part)