Download presentation
Presentation is loading. Please wait.
1
Capability-Based Optimization in Mediators Rohit Deshmukh ID 120 CS-257 Rohit Deshmukh ID 120 CS-257
2
Modes of Information Integration 1.Federated Collection DB1 DB2 DB3DB4 Sources are Independent, but one source can call on others to supply Information
3
Modes of Information Integration 2. Data Warehousing Copies of data from several sources are stored in a single database, called Data Warehouse. Warehouse User Query Result Combiner Extractor Source1Source2
4
Modes of Information Integration 3. Mediation Mediator Wrapper Source1Source2 query result A mediator is a software component that supports a virtual database.
5
Capability-Based Optimization in Mediators Problem of Limited Source Capabilities Many useful sources have only Web-based interfaces Web sources usually permit querying only through a query form Legacy systems(designed to be queried in specific way) Reasons of security Indexes on large databases may make certain kinds of queries feasible while others too expensive Problem of Limited Source Capabilities Many useful sources have only Web-based interfaces Web sources usually permit querying only through a query form Legacy systems(designed to be queried in specific way) Reasons of security Indexes on large databases may make certain kinds of queries feasible while others too expensive
6
Capability-Based Optimization in Mediators Notation for Describing Source Capabilities f (free) The attribute can be specified or not. b(bound) We must specify a value for the attribute, any value is allowed. u(unspecified) we are not permitted to specify value for the attribute c[S] choice from set S o[S] optional from set S We place a prime e.g. b’ on a code if the attribute is not a part of the output query. Notation for Describing Source Capabilities f (free) The attribute can be specified or not. b(bound) We must specify a value for the attribute, any value is allowed. u(unspecified) we are not permitted to specify value for the attribute c[S] choice from set S o[S] optional from set S We place a prime e.g. b’ on a code if the attribute is not a part of the output query.
7
Notation for Describing Source Capabilities Example Dealer 1 is a source of data in the form Cars(SerialNo, model, color, autoTrans, cdPlayer) Two possible ways that Dealer 1 might allow to be queried 1.b’uuuu 2.ubbo[yes,no]o[yes,no] Alternative adornment, suppose that queries limit the model and color attributes to valid values; uc[modelx,gobi,…]c[red,blue,….]o[yes,no]o[yes,no] Example Dealer 1 is a source of data in the form Cars(SerialNo, model, color, autoTrans, cdPlayer) Two possible ways that Dealer 1 might allow to be queried 1.b’uuuu 2.ubbo[yes,no]o[yes,no] Alternative adornment, suppose that queries limit the model and color attributes to valid values; uc[modelx,gobi,…]c[red,blue,….]o[yes,no]o[yes,no] f(free); b(bound); u(unspecified); c[S] ; o[S]
8
Capability-Based Query-Plan Selection A capability based query optimizer first considers what queries it can ask at the sources that will help answer the query. The bindings may make some more queries at the sources.The process is repeated until We have asked enough queries at the sources to resolve all the conditions of the mediator queries.Such a plan is called feasible. We can construct no more valid forms of source queries. In which case the mediator must give up. A capability based query optimizer first considers what queries it can ask at the sources that will help answer the query. The bindings may make some more queries at the sources.The process is repeated until We have asked enough queries at the sources to resolve all the conditions of the mediator queries.Such a plan is called feasible. We can construct no more valid forms of source queries. In which case the mediator must give up.
9
Capability-Based Query-Plan Selection Example Dealer 2 has two different sources. 1.Autos(serial, model, color) 2.Options(serial, option) Assuming we have only the following adornments for the two sources. ubf for Autos bu and uc [autoTrans, cdPlayer]. Example Dealer 2 has two different sources. 1.Autos(serial, model, color) 2.Options(serial, option) Assuming we have only the following adornments for the two sources. ubf for Autos bu and uc [autoTrans, cdPlayer]. f(free); b(bound); u(unspecified); c[S] ; o[S]
10
Example Find the serial numbers and colors of Modelx with a CD player. 1.Select (serial,color) from Autos where model=modelx 2.Use bu for Options source for each serial from above match; option = CdPlayer Find the serial numbers and colors of Modelx with a CD player. 1.Select (serial,color) from Autos where model=modelx 2.Use bu for Options source for each serial from above match; option = CdPlayer f(free); b(bound); u(unspecified); c[S] ; o[S]
11
Example Find the serial numbers and colors of Modelx with a CD player. 1.Query Options Select serial from options where option = CdPlayer 2.Now query Autos Select (serial,colors) where model = modelx; 3.Intersect the two sets of serial numbers. Find the serial numbers and colors of Modelx with a CD player. 1.Query Options Select serial from options where option = CdPlayer 2.Now query Autos Select (serial,colors) where model = modelx; 3.Intersect the two sets of serial numbers. f(free); b(bound); u(unspecified); c[S] ; o[S]
12
Example Find the serial numbers and colors of Modelx with a CD player. 1.Query Options as in previous case Select serial from options where option = CdPlayer 2.Use these serial numbers to query Autos, select color where serial = (selected serial) and model = modelx This would not work because the second part, does not have a matching adornment. A Capability-based optimizer eliminates infeasible plans such as this one. Find the serial numbers and colors of Modelx with a CD player. 1.Query Options as in previous case Select serial from options where option = CdPlayer 2.Use these serial numbers to query Autos, select color where serial = (selected serial) and model = modelx This would not work because the second part, does not have a matching adornment. A Capability-based optimizer eliminates infeasible plans such as this one. f(free); b(bound); u(unspecified); c[S] ; o[S]
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.