relational algebra for Limit Operator

后端 未结 2 482
隐瞒了意图╮
隐瞒了意图╮ 2021-01-21 02:23

What is relational algebra for these two SQL queries:

Select * from film where film_rating = \'PG\' limit 20;

How can we show limit?

         


        
2条回答
  •  囚心锁ツ
    2021-01-21 03:08

    About the limit in relational algebra. Traditional relational algebra does not support anything like the limit in SQL. This problem has been recognized and studied by Li, Chang, Ilyas and Song in RankSQL: query algebra and optimization for relational top-k queries (SIGMOD 2005). They have proposed a monotonic scoring function F that ranks the results by the sorting operator tauF.

提交回复
热议问题