computing capabilities of mediators

32
Computing Computing Capabilities of Capabilities of Mediators Mediators Ramana Yerneni Ramana Yerneni Chen Li Chen Li Hector Garcia-Molina Hector Garcia-Molina Jeffrey Ullman Jeffrey Ullman alk created by Rahul, modified by Sudarshan

Upload: andres

Post on 07-Jan-2016

41 views

Category:

Documents


0 download

DESCRIPTION

Computing Capabilities of Mediators. Ramana Yerneni Chen Li Hector Garcia-Molina Jeffrey Ullman. T alk created by Rahul, modified by Sudarshan. Wrapper Architecture. User Query. Catalog. Mediator. Wrapper. Wrapper. Data Source. Data Source. Data Source. Data Source. Scope. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Computing Capabilities of Mediators

Computing Computing Capabilities of Capabilities of

MediatorsMediators

Ramana YerneniRamana YerneniChen LiChen Li

Hector Garcia-MolinaHector Garcia-MolinaJeffrey UllmanJeffrey Ullman

alk created by Rahul, modified by Sudarshan

Page 2: Computing Capabilities of Mediators

Wrapper ArchitectureWrapper Architecture

Mediator Catalog

Wrapper Wrapper

Data Source Data Source Data Source Data Source

User Query

Page 3: Computing Capabilities of Mediators

ScopeScope

Framework for expressing source Framework for expressing source capabilitiescapabilities

Approach for computing mediator Approach for computing mediator capabilitiescapabilities

Extending mediator capabilitiesExtending mediator capabilities

Page 4: Computing Capabilities of Mediators

PathwayPathway

Capabilities of data sourcesCapabilities of data sources Simple mediatorsSimple mediators Advanced techniques in Advanced techniques in

mediatorsmediators Dynamic mediatorsDynamic mediators Concise capability descriptionConcise capability description

Page 5: Computing Capabilities of Mediators

Capabilities of Data Capabilities of Data SourcesSources Attribute Adornments:Attribute Adornments:

– Adornment Adornment f f :: for freefor free– Adornment Adornment uu : : for unspecifiablefor unspecifiable– Adornment Adornment bb : : for boundfor bound– Adornment Adornment c[s] c[s] :: for compulsory for compulsory

constantconstant– Adornment Adornment o[s]o[s] : : for optionalfor optional

constantconstant

Page 6: Computing Capabilities of Mediators

Capabilities of Data Capabilities of Data SourcesSources

R(X Y Z) {b u f }R(X Y Z) {u b f }Exported Views

Data Source

R ( x1, Y, Z ) R ( X, Y, Z )

Page 7: Computing Capabilities of Mediators

PathwayPathway

Capabilities of data sources Simple mediatorsSimple mediators Advanced techniques in Advanced techniques in

mediatorsmediators Dynamic mediatorsDynamic mediators Concise capability descriptionConcise capability description ExampleExample

Page 8: Computing Capabilities of Mediators

Simple MediatorsSimple Mediators

Simple Mediator PropertiesSimple Mediator Properties– No post processingNo post processing– Performs joins blindlyPerforms joins blindly

Union ViewsUnion Views– Variable Adornments in Union View Variable Adornments in Union View

are computed from base view are computed from base view adornmentsadornments

– Mapping FunctionMapping Function

Page 9: Computing Capabilities of Mediators

Simple MediatorsSimple Mediators

Mapping Function:Mapping Function:

ff o[s3]o[s3] bb c[s4]c[s4] uu

ff ff o[s3]o[s3] bb c[s4]c[s4] uu

o[s1]o[s1] o[s1o[s1]]

o[s1o[s1s3s3]]

c[s1c[s1]]

c[s1c[s1ss4]4]

uu

bb bb c[s3]c[s3] bb c[s4]c[s4] --

c[s2]c[s2] c[s2]c[s2] c[s2c[s2s3s3]]

c[s2c[s2]]

c[s2c[s2ss4]4]

--

uu uu uu -- -- uu

Page 10: Computing Capabilities of Mediators

Union of two viewsUnion of two views– ExampleExample

Simple MediatorsSimple Mediators

R(X, Y, Z) {b f u}

Data Source

R(X, Y, Z) {f b u}

Data Source

R(X, Y, Z) { b b u }

Mediator Union View

Page 11: Computing Capabilities of Mediators

Simple MediatorsSimple Mediators

Union of two base views with multiple Union of two base views with multiple templatestemplates– Cross product of two template setsCross product of two template sets– For each pair apply mapping functionFor each pair apply mapping function

Union of multiple base views with Union of multiple base views with multiple templatesmultiple templates– Process two base views at a timeProcess two base views at a time– Repeat (n-1) timesRepeat (n-1) times

Page 12: Computing Capabilities of Mediators

Simple MediatorsSimple Mediators

Join ViewsJoin Views– Non-join attribute adornments are copied Non-join attribute adornments are copied

as they are in join viewas they are in join view– Join attributes are computed using Join attributes are computed using

mapping functionmapping function

R1(X,Y) {b f }

Data Source

R2(Y,Z) {b u}

Data Source

R1R2(X, Y, Z) { b b u }Mediator Join View

Page 13: Computing Capabilities of Mediators

Simple MediatorsSimple Mediators

Selection ViewsSelection Views– Pass the query to underlying data source as Pass the query to underlying data source as

it is if it fits the templateit is if it fits the template– Filter the results according to selection Filter the results according to selection

predicatespredicates

Projection ViewsProjection Views– Hidden attributes are left unspecifiedHidden attributes are left unspecified– Works only if hidden attribute adornments Works only if hidden attribute adornments

are are f, u, of, u, o

Page 14: Computing Capabilities of Mediators

PathwayPathway

Capabilities of data sources Simple mediatorsSimple mediators Advanced techniques in Advanced techniques in

mediatorsmediators Dynamic mediatorsDynamic mediators Concise capability descriptionConcise capability description

Page 15: Computing Capabilities of Mediators

Advance Techniques in Advance Techniques in MediatorsMediators Union ViewsUnion Views

– Post processingPost processing Filter the input query to fit source viewsFilter the input query to fit source views Post process the results to match user Post process the results to match user

requirementsrequirements

– Union view adornments are Union view adornments are computed using Mapping functioncomputed using Mapping function

Page 16: Computing Capabilities of Mediators

Advance Techniques in Advance Techniques in MediatorsMediators Union View ExampleUnion View Example

R(X,Y,Z){b f u }

Data Source

R(X,Y,Z){b u f }

Data Source

R(X, Y, Z) { b u u }Mediator Union View

R(x1,y1,z1)

R(x1,y1,Z)

R(x1,Y,z1)

b f f }

Page 17: Computing Capabilities of Mediators

Union with Union with postprocesingpostprocesing

ff o[s3]o[s3] bb c[s4]c[s4] uu

ff ff ff bb c[s4]c[s4] ff

o[s1o[s1]]

ff ff bb c[c[s4s4]] ff

b b b b bb bb c[s4]c[s4] bb

c[s2c[s2]]

c[s2]c[s2] c[c[s2s2]] c[s2c[s2]]

c[s2c[s2ss4]4]

c[s2]c[s2]

uu ff ff bb c[s4]c[s4] ff

Mapping function for union with postprocessing

Page 18: Computing Capabilities of Mediators

Joins with Binding Joins with Binding PassingPassing Join ViewsJoin Views

– Non-join attribute adornments are Non-join attribute adornments are copied as they arecopied as they are

– Passing join attribute bindings from Passing join attribute bindings from left to right viewleft to right view

– Join attribute adornments are Join attribute adornments are computed using new mapping computed using new mapping functionfunction

Page 19: Computing Capabilities of Mediators

Joins with Binding Joins with Binding Passing: ExamplePassing: Example Join views: passing bindingsJoin views: passing bindings

R1(X,Z){b f }

Data Source

R2(Z,V){b f }

Data Source

R(X, Z, V) { b b f }Mediator Join View

R(x1,Z,V)

R(x1,Z) R(z1,V)

{ b f f }

Page 20: Computing Capabilities of Mediators

Join with Binding Join with Binding Passing + Passing + PostprocessingPostprocessing

ff o[s3]o[s3] bb c[s4]c[s4] uu

ff ff ff ff c[s4]c[s4] ff

o[s1o[s1]]

ff ff ff c[c[s4s4]] ff

b b b b bb bb c[s4]c[s4] bb

c[s2c[s2]]

c[s2]c[s2] c[s2]c[s2] c[s2c[s2]]

c[s2c[s2ss4]4]

c[s2]c[s2]

uu ff ff ff c[s4]c[s4] ff

•Aka “Dependent join”•Mapping function (left relation -> rows)

LeftLeft Rt.Rt.

Page 21: Computing Capabilities of Mediators

Multiple Joins/BindingsMultiple Joins/Bindings

Join of 2 relations with multiple bindings for Join of 2 relations with multiple bindings for each relationeach relation– Cross productCross product

one result template for each combinationone result template for each combination

Ordered sequence of n relationsOrdered sequence of n relations– Compute pairwise from leftCompute pairwise from left

Binding pattern depends on join orderBinding pattern depends on join order– n! possible join sequences with n relationsn! possible join sequences with n relations– Compute pattern (pairwise) for each sequence, Compute pattern (pairwise) for each sequence,

take union take union Mediator will have to select appropriate join order Mediator will have to select appropriate join order

depending on query bindingsdepending on query bindings

Page 22: Computing Capabilities of Mediators

Selections with Selections with postprocessingpostprocessing

Base view Base view adornmentadornment

Sel. Sel. Attribute Attribute AdornmentAdornment

Non-sel Non-sel attribute attribute adornmentadornment

ff ff ff

o[s1]o[s1] ff ff

bb f or bf or b bb

c[s1]c[s1] f or c[s1]f or c[s1] c[s1]c[s1]

uu ff ff

Selection may or may not provide value for attribute

Page 23: Computing Capabilities of Mediators

PathwayPathway

Capabilities of data sources Simple mediatorsSimple mediators Advanced techniques in Advanced techniques in

mediatorsmediators Dynamic mediatorsDynamic mediators Concise capability descriptionConcise capability description

Page 24: Computing Capabilities of Mediators

Dynamic MediatorsDynamic Mediators

Liberal templatesLiberal templates– Answerability depends on state of Answerability depends on state of

data in data sourcedata in data source– Can’t be always answeredCan’t be always answered

Conservative templatesConservative templates– Can always be answeredCan always be answered– Computed using techniques Computed using techniques

discussed in earlier slidesdiscussed in earlier slides

Page 25: Computing Capabilities of Mediators

Dynamic MediatorsDynamic Mediators

Liberal Template ExampleLiberal Template Example

R1(X,Y){b f }

Data Source

R2(Y,Z){c[s] f }

Data Source

R(X, Y, Z) { b c[s] f }Mediator Join View

R(x1,Y,Z)

R1(x1,Y) R(y1,Z)

{ b f f }

Page 26: Computing Capabilities of Mediators

Liberal Template for Liberal Template for Join ViewsJoin Views

ff o[s3]o[s3] bb c[s4]c[s4] uu

ff ff ff ff ff ff

o[s1o[s1]]

ff ff ff ff ff

b b b b bb bb bb bb

c[s2c[s2]]

c[s2]c[s2] c[s2]c[s2] c[s2c[s2]]

c[s2]c[s2] c[s2]c[s2]

uu ff ff ff ff ff

LeftLeft Rt.Rt.

Page 27: Computing Capabilities of Mediators

Dynamic MediatorsDynamic Mediators

Simple MediatorsSimple Mediators Mediators employing advanced Mediators employing advanced

techniquestechniques– Post ProcessingPost Processing– Passing bindingsPassing bindings

Dynamic mediatorsDynamic mediators– Liberal TemplatesLiberal Templates

Page 28: Computing Capabilities of Mediators

PathwayPathway

Capabilities of data sources Simple mediatorsSimple mediators Advanced techniques in Advanced techniques in

mediatorsmediators Dynamic mediatorsDynamic mediators Concise capability descriptionConcise capability description

Page 29: Computing Capabilities of Mediators

Concise Capability Concise Capability DescriptionDescription Mediator view space is exponentialMediator view space is exponential k templates per view, n sourcesk templates per view, n sources

– View space will be kView space will be knn

Large number of templates are Large number of templates are redundantredundant– M1(M1(b f b b f b ) and M2() and M2(f f f f f f ) : ) :

M2 is redundant M2 is redundant

Page 30: Computing Capabilities of Mediators

Concise Capability Concise Capability DescriptionDescription Adornment GraphAdornment Graph

b

C[s1]

O[s2]

u

f

Page 31: Computing Capabilities of Mediators

Concise Capability Concise Capability DescriptionDescription Subsumption testSubsumption test

– Template T subsumes T1 iff Template T subsumes T1 iff Every attribute x in T1 is atleast as Every attribute x in T1 is atleast as restrictive as Trestrictive as T

Subsumption test partitions the Subsumption test partitions the set of templatesset of templates

Select the template which Select the template which subsumes all other templates in a subsumes all other templates in a partitionpartition

Page 32: Computing Capabilities of Mediators

PathwayPathway

Capabilities of data sources Simple mediatorsSimple mediators Advanced techniques in Advanced techniques in

mediatorsmediators Dynamic mediatorsDynamic mediators Concise capability descriptionConcise capability description