Top Banner
Incremental Maintenance for Materialized Views over Semistructured Data Written By: Serge Abiteboul Jason McHuge Michael Rys Vasilis Vassalos Janet L. Wiener presented By: Galit Fridman
22

Incremental Maintenance for Materialized Views over Semistructured Data Written By: Serge Abiteboul Jason McHuge Michael Rys Vasilis Vassalos Janet L.

Dec 16, 2015

Download

Documents

Moses Charles
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Incremental Maintenance for Materialized Views over Semistructured Data Written By: Serge Abiteboul Jason McHuge Michael Rys Vasilis Vassalos Janet L.

Incremental Maintenance for Materialized Views

over Semistructured Data

Written By: Serge Abiteboul Jason McHuge

Michael Rys Vasilis VassalosJanet L. Wiener

presented By: Galit Fridman

Page 2: Incremental Maintenance for Materialized Views over Semistructured Data Written By: Serge Abiteboul Jason McHuge Michael Rys Vasilis Vassalos Janet L.

Presented by: Galit Fridman 2

Outline

Introduction Incremental Maintenance Approach Definitions Incremental Maintenance Algorithm Evaluation Conclusion

Page 3: Incremental Maintenance for Materialized Views over Semistructured Data Written By: Serge Abiteboul Jason McHuge Michael Rys Vasilis Vassalos Janet L.

Presented by: Galit Fridman 3

Introduction

Database views increase the flexibility of a database system.

Views are materialized to speed up querying, when the time is critical .

Page 4: Incremental Maintenance for Materialized Views over Semistructured Data Written By: Serge Abiteboul Jason McHuge Michael Rys Vasilis Vassalos Janet L.

Presented by: Galit Fridman 4

Introduction (cont.)

The view contents must be maintained in order to preserve consistency with the base data. Two ways:

• Recomputing the view contents from the database.

• Computing the incremental updates to the view, based on the updates to the database. (used by the new algorithm)

Page 5: Incremental Maintenance for Materialized Views over Semistructured Data Written By: Serge Abiteboul Jason McHuge Michael Rys Vasilis Vassalos Janet L.

Presented by: Galit Fridman 5

Incremental Maintenance Approach

For nearly all types of database updates. It is more efficient to apply this algorithm to the view than recompute the view from the database.

Page 6: Incremental Maintenance for Materialized Views over Semistructured Data Written By: Serge Abiteboul Jason McHuge Michael Rys Vasilis Vassalos Janet L.

Presented by: Galit Fridman 6

The Algorithm is Based on:

OEM - Object Exchange Model

Lorel Query Language

Page 7: Incremental Maintenance for Materialized Views over Semistructured Data Written By: Serge Abiteboul Jason McHuge Michael Rys Vasilis Vassalos Janet L.

Presented by: Galit Fridman 7

OEM - Object Exchange Model

Page 8: Incremental Maintenance for Materialized Views over Semistructured Data Written By: Serge Abiteboul Jason McHuge Michael Rys Vasilis Vassalos Janet L.

Presented by: Galit Fridman 8

Lorel Query Language

Uses the select..from..where

clauses and additional clause with. Provides powerful path expressions

for traversing the data and rules.

Page 9: Incremental Maintenance for Materialized Views over Semistructured Data Written By: Serge Abiteboul Jason McHuge Michael Rys Vasilis Vassalos Janet L.

Presented by: Galit Fridman 9

Standard Query

Example 1select efrom Guide.Restaurant r, r.Entree ewhere r.Name = “Baghdad Cafe”and e.Ingredient = “Mushroom”

The answer is: {&9}

Page 10: Incremental Maintenance for Materialized Views over Semistructured Data Written By: Serge Abiteboul Jason McHuge Michael Rys Vasilis Vassalos Janet L.

Presented by: Galit Fridman 10

View Specification Statements

Identify objects within a graph.

Import arbitrary subgraphs.

Add or remove objects appearing in the view.

Page 11: Incremental Maintenance for Materialized Views over Semistructured Data Written By: Serge Abiteboul Jason McHuge Michael Rys Vasilis Vassalos Janet L.

Presented by: Galit Fridman 11

View Specification

Example 2define view FavoriteEntrees as Entrees = select efrom Guide.Restaurant r, r.Entree ewhere exists x in r.Name = “Baghdad Cafe”and exists y in e.Ingredient = “Mushroom”with e.Name n ,e.Ingredient I;

Page 12: Incremental Maintenance for Materialized Views over Semistructured Data Written By: Serge Abiteboul Jason McHuge Michael Rys Vasilis Vassalos Janet L.

Presented by: Galit Fridman 12

Materialized Views

Primary objects- objects that are bound to e.

adjunct objects - subobjects discovered by the with clause.

Page 13: Incremental Maintenance for Materialized Views over Semistructured Data Written By: Serge Abiteboul Jason McHuge Michael Rys Vasilis Vassalos Janet L.

Presented by: Galit Fridman 13

Update Operations

Insertion and deletions of the edge. Denoted: <Ins,o1,L,o2>

<Del,o1,L,o2> Change of value of the atomic

object. Denoted: <Chg,o1,OldVal,NewVal>

Page 14: Incremental Maintenance for Materialized Views over Semistructured Data Written By: Serge Abiteboul Jason McHuge Michael Rys Vasilis Vassalos Janet L.

Presented by: Galit Fridman 14

Incremental Maintenance Algorithm Input

1. View specification statements.2. Update U: <Ins,o1,L,o2>,

<Del,o1,L,o2>, Chg,o1,Oldval,NewVal>

3. New database state DB’.4. View instance V.

Page 15: Incremental Maintenance for Materialized Views over Semistructured Data Written By: Serge Abiteboul Jason McHuge Michael Rys Vasilis Vassalos Janet L.

Presented by: Galit Fridman 15

Incremental Maintenance algorithm

Basic Structure:

Page 16: Incremental Maintenance for Materialized Views over Semistructured Data Written By: Serge Abiteboul Jason McHuge Michael Rys Vasilis Vassalos Janet L.

Presented by: Galit Fridman 16

Base Cost For Update Operations

Page 17: Incremental Maintenance for Materialized Views over Semistructured Data Written By: Serge Abiteboul Jason McHuge Michael Rys Vasilis Vassalos Janet L.

Presented by: Galit Fridman 17

Database Size

Page 18: Incremental Maintenance for Materialized Views over Semistructured Data Written By: Serge Abiteboul Jason McHuge Michael Rys Vasilis Vassalos Janet L.

Presented by: Galit Fridman 18

Number of label occurrences

Page 19: Incremental Maintenance for Materialized Views over Semistructured Data Written By: Serge Abiteboul Jason McHuge Michael Rys Vasilis Vassalos Janet L.

Presented by: Galit Fridman 19

Length of the form clause

Page 20: Incremental Maintenance for Materialized Views over Semistructured Data Written By: Serge Abiteboul Jason McHuge Michael Rys Vasilis Vassalos Janet L.

Presented by: Galit Fridman 20

Bound Variable Position

Page 21: Incremental Maintenance for Materialized Views over Semistructured Data Written By: Serge Abiteboul Jason McHuge Michael Rys Vasilis Vassalos Janet L.

Presented by: Galit Fridman 21

Selectivity of the where clause

Page 22: Incremental Maintenance for Materialized Views over Semistructured Data Written By: Serge Abiteboul Jason McHuge Michael Rys Vasilis Vassalos Janet L.

Presented by: Galit Fridman 22

Conclusion

Advantage:• The algorithm outperforms recomputation of

the view, even for large numbers of insert and delete edge updates.

• Scales well with increasing the database. Disadvantage:

• can be expensive as full recomputation of the view for a single atomic value change.