Chengkai Li Kevin-Chen-Chuan Chang Ihab Ilyas Sumin Song - PowerPoint PPT Presentation

About This Presentation
Title:

Chengkai Li Kevin-Chen-Chuan Chang Ihab Ilyas Sumin Song

Description:

Chengkai Li Kevin-Chen-Chuan Chang Ihab Ilyas Sumin Song RankSQL: Query Algebra and Optimization for Relational Top- k Queries Presented by: Mariam John – PowerPoint PPT presentation

Number of Views:64
Avg rating:3.0/5.0
Slides: 21
Provided by: mxj5
Learn more at: https://crystal.uta.edu
Category:

less

Transcript and Presenter's Notes

Title: Chengkai Li Kevin-Chen-Chuan Chang Ihab Ilyas Sumin Song


1
Chengkai Li Kevin-Chen-Chuan Chang
Ihab Ilyas Sumin Song
RankSQL Query Algebra and Optimization
for Relational Top- k Queries
  • Presented by
    Mariam John
  • CSE 6392
  • 03/20/2006

2
Contents
  • Introduction
  • RankSQL
  • Ranking Query Model
  • Rank-Relational Algebra
  • Ranking Query PlansExecution Model
  • Conclusion

3
Introduction
  • Top-k queries provides only the top k query
    results according to a user-specified ranking
    function.
  • Most of the available solutions are in the
    middleware, or focus on specific operators and
    queries.
  • Top-k queries are not treated as first class
    query type in RDBMS. Relational algebra has no
    notion for ranking.

4
RankSQL
  • Provides seamless support and integration of
    top-k queries with the existing SQL query
    facility in RDBMS.
  • Supports ranking as a first-class database
    construct.
  • Extends relational algebra and query
    optimization.

5
Example of a Top-k Query
  • SELECT
  • FROM Hotel h, Restaurant r, Museum m
  • WHERE c1 AND c2 AND c3
  • ORDER BY p1p2p3
  • LIMIT k
  • c1 r.cuisineItalian p1
    cheap(h.price)
  • c2 h.pricer.pricelt100 p2
    close(h.addr,r.addr)
  • c3 r.aream.area p3
    related(m.collection,

  • dinosaur)

6
Rank Query Model
Ranking
Filtering
  • Rank relational query has 4 types of predicates
  • Filtering Boolean-selection
    predicates
  • Boolean-join
    predicates
  • Ranking rank-selection predicates
  • rank-join predicates
  • Goal is to support rank relational queries
    efficiently.

7
Rank-Relational Query
  • Such queries add a ranking dimension to query
    processing and optimization.
  • Filtering restricts tuple membership by
    applying a Boolean function of Boolean selection
    or join predicates.
  • Ranking restricts order by applying a monotonic
    scoring function of ranking predicates.

8
Ranking as First-Class Construct
  • Support for ranking as a first class construct in
    RDBMS is lacking.
  • Relational algebra models Boolean filtering as a
    first class construct in query processing.
  • c1 is a selection over R, and
  • c2 is a join condition over R S

9
Filtering as a First-Class Construct
  • Algebra framework supports the following for
    Boolean filtering
  • - splitting
  • - interleaving
  • Enable query optimization to transform from
    canonical form to efficient query plans.

10
Ranking as First-Class Construct
  • Algebraic support for optimization is lacking for
    ranking.
  • The sorting operator is monolithic.
  • It may be beneficial to evaluate ranking
    predicates one by one and interleave them with
    Boolean filtering.

11
Challenges
  • First, we must extend relational algebra to do
    the following
  • Handle ranking
  • Define algebraic laws to handle equivalence
    transformation
  • Second, we need to generalize query optimization
    techniques to integrate the parallel dimensions
    of Boolean filtering and ranking.

12
Rank-Relational Algebra
  • Rank-Relation is a relation with its tuples
    scored and ordered accordingly
  • How do we rank a relation, given

13
Ranking principle
  • Maximum possible score of a tuple t, denoted by
    , is defined as
  • if
  • 1 otherwise

14
Examples of Rank-Relations
15
Operators
  • Need to extend relational-algebra operators for
    manipulating rank-relations.
  • For supporting ranking as a first-class
    construct, define a new operator µ.
  • This new rank operator should satisfy the two
    requirements splitting and interleaving.

16
New Operator, µ
  • Extend relational algebra by adding a new rank
    operator, µ. What does mean?
  • Extend the original semantics of existing
    operators with rank-awareness, enabling
    interaction with the new rank operator.
  • Extend relational algebra such that it gives
    several equivalences relevant to ranking.

17
Results of Operators
18
Ranking Query Plans Execution Model
  • Extend the common execution model to handle rank
    query.
  • Operators incrementally output rank relations.
  • Query has an explicitly requested result size.
  • Key capability of a rank-aware operator is to
    decide if enough information has been obtained
    from its input tuples in order to incrementally
    produce the next ranked output tuple.

19
Example
20
Conclusion
  • RankSQL is a system that provides a systematic
    framework to support efficient evaluation of
    top-k queries in RDBMS.
  • Extend relational algebra to make ranking a
    first-class construct.
  • Query execution model is extended to handle
    ranking query.
  • Rank-aware operators are selective and
    context-sensitive.
Write a Comment
User Comments (0)
About PowerShow.com