Scalable Trigger Processing - PowerPoint PPT Presentation

1 / 17
About This Presentation
Title:

Scalable Trigger Processing

Description:

... is small All distinct structures of trigger expressions should be small enough to fit in the main memory Motivation Internet programming Web users can create ... – PowerPoint PPT presentation

Number of Views:113
Avg rating:3.0/5.0
Slides: 18
Provided by: Vija76
Category:

less

Transcript and Presenter's Notes

Title: Scalable Trigger Processing


1
Scalable Trigger Processing
  • G04
  • Betsy George
  • Vijay Gandhi

2
Problem Definition
  • Given A Relational DBMS and Trigger statements
  • Find Predicate Index Structure of Triggers
  • Objective Minimize the trigger processing time
  • Constraints
  • Number of distinct structures of trigger
    expressions is small
  • All distinct structures of trigger expressions
    should be small enough to fit in the main memory

3
Motivation
  • Internet programming
  • Web users can create personalized triggers
  • Active Databases
  • Stream-based applications

4
Related Work
  • ECA Model Indexing Parallel
    (not scalable) Processing

  • Gupt89,Hell98
  • Range Predicates AI
  • Hans96b
    Forg82,Mira87
  • (large memory)
    (smaller rule set)

5
Contribution
  • Trigger processing Architecture
  • Concurrent processing

6
Key Concepts TiggerMan Architecture
7
Key Concepts Trigger Structure
trigger name tokens event selection
predicate selection predicate join
predicate action
  • Create trigger
  • T1
  • From
  • bank_account, checking_account
  • On
  • update(bank_account)
  • when
  • bank_account.id X
  • And bank_account.balance lt 10000
  • And bank_account.id checking_account.id
  • do
  • notify_by_email(X)

8
Key Concepts Exercise to audience
  • Create trigger
  • T2
  • From
  • bank_account
  • On
  • update(bank_account)
  • when
  • bank_account.id Y
  • And bank_account.balance lt 20000
  • do
  • notify_by_email(Y)
  • Create trigger
  • T3
  • From
  • bank_account
  • On
  • update(bank_account)
  • when
  • bank_account.id Z
  • do
  • notify_by_email(Z)

Identify tokens, predicates!
9
Key Concepts Expression Signatures
Expression Signature E1 bank_account.account.id
CONSTANT used in T1, T2, T3 E2 bank_accoun
t. balance lt CONSTANT used in T1, T2
  • Triggers
  • T1
  • when bank_account.id X
  • And bank_account.balance lt 10000
  • And bank_account.id checking_account.id
  • T2
  • when bank_account.id Y
  • And bank_account.balance lt 20000
  • T3
  • when bank_account.id Z

10
Key Concepts Predicate Index Structure
Table of Trigger ID and
Corresponding constants
  • Hash(token)

ES
token index
ES
ES
token index
token index
ES Expression Signature
11
Predicate Index Structure Example
T1 when bank_account.id X And
bank_account.balance lt 10000 And bank_account.id
checking_account.id T2 when bank_account.id
Y And bank_account.balance lt 20000 T3 when
bank_account.id Z
T1 T2 T3
X Y Z
E1
bank_account index
E2
T1 T2
10000 20000
Hash(token)
checking_account index
E1 bank_account.account.id CONSTANT E2 bank_a
ccount. balance lt CONSTANT
12
Trigger Processing
On(update(bank_account))
T1 ?
T2 ?
T3 ?
  • Naïve Approach
  • Test all triggers (conditions), one by one

13
Trigger Processing
  • e.g., bank_account.balance 15000
  • And bank_account.id Y
  • Only T2 will be fired

On an event, get all unique tokens from
corresponding triggers For each token t Hash
to the Expression Signature List (t) For each
element in Expression Signature List (t)
Add selection predicate that satisfies
condition End For End For Process join
predicates, if required Perform corresponding
action
14
Concurrency
  • Token-level concurrency

15
Validation
  • No validations provided in the paper

16
Future Work
  • Temporal trigger processing
  • Trigger with aggregates
  • New operators and data types

17
Rewrite today
  • Validations
  • Execution Trace
Write a Comment
User Comments (0)
About PowerShow.com