On the equivalence and rewriting of aggregate queries

被引:0
|
作者
Stéphane Grumbach
Maurizio Rafanelli
Leonardo Tininini
机构
[1] INRIA,
[2] CNR-IASI,undefined
来源
Acta Informatica | 2004年 / 40卷
关键词
Linear Expansion; Expressive Power; Aggregation Operator; Isomorphic Linear; Arithmetical Computation;
D O I
暂无
中图分类号
学科分类号
摘要
We introduce a first-order language with real polynomial arithmetic and aggregation operators (count, iterated sum and multiply), which is well suited for the definition of aggregate queries involving complex statistical functions. It offers a good trade-off between expressive power and complexity, with a tractable data complexity. Interestingly, some fundamental properties of first-order with real arithmetic are preserved in the presence of aggregates. In particular, there is an effective quantifier elimination for formulae with aggregation. We then consider the problem of querying data that has already been aggregated in aggregate views, and focus on queries with an aggregation over a conjunctive query (namely single-block aggregate group-by queries without having clause). Our main conceptual contribution is the introduction of a new equivalence relation among conjunctive queries, the isomorphism modulo a product. We prove that the equivalence of aggregate queries such as for instance averages reduces to it. Deciding if two queries are isomorphic modulo a product is shown to be NP-complete. We then analyze the equivalence problem in the case of aggregate conjunctive queries with comparisons. We introduce the concept of cross isomorphic linear expansions, which generalizes isomorphim modulo a product, and we show that equivalence reduces to it and that it can be decided in PSPACE. Finally, we show that the problem of complete rewriting of count queries using count views is NP-complete, and we introduce new rewriting techniques based on the isomorphism modulo a product. to recover the values of counts by complex arithmetical computation from the views.
引用
收藏
页码:529 / 584
页数:55
相关论文
共 50 条
  • [1] On the equivalence and rewriting of aggregate queries
    Grumbach, S
    Rafanelli, M
    Tininini, L
    [J]. ACTA INFORMATICA, 2004, 40 (08) : 529 - 584
  • [2] Query Rewriting on Aggregate Queries over Uncertain Database
    Xie, Dong
    Long, Hai
    [J]. COMPUTING AND INTELLIGENT SYSTEMS, PT IV, 2011, 234 : 25 - 31
  • [3] Query Rewriting on Aggregate Queries over Uncertain Database
    Xie, Dong
    Long, Hai
    [J]. 2010 SECOND INTERNATIONAL CONFERENCE ON E-LEARNING, E-BUSINESS, ENTERPRISE INFORMATION SYSTEMS, AND E-GOVERNMENT (EEEE 2010), VOL I, 2010, : 368 - 371
  • [4] Rewriting Aggregate Queries Using Functional Dependencies within the Cloud
    Perriot, Romain
    d'Orazio, Laurent
    Laurent, Dominique
    Spyratos, Nicolas
    [J]. INFORMATION SEARCH, INTEGRATION, AND PERSONALIZATION, 2014, 421 : 31 - 42
  • [5] Rewriting Guarded Negation Queries
    Barany, Vince
    Benedikt, Michael
    ten Cate, Balder
    [J]. MATHEMATICAL FOUNDATIONS OF COMPUTER SCIENCE 2013, 2013, 8087 : 98 - 110
  • [6] Rewriting Queries with Negated Atoms
    Alfonso, Enrique Matos
    Stamou, Giorgos
    [J]. RULES AND REASONING, 2017, 10364 : 151 - 167
  • [7] Ontological Queries: Rewriting and Optimization
    Gottlob, Georg
    Orsi, Giorgio
    Pieris, Andreas
    [J]. IEEE 27TH INTERNATIONAL CONFERENCE ON DATA ENGINEERING (ICDE 2011), 2011, : 2 - 13
  • [8] Rewriting queries using views
    Flesca, S
    Greco, S
    [J]. IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, 2001, 13 (06) : 980 - 995
  • [9] Views and Queries: Determinacy and Rewriting
    Nash, Alan
    Segoufin, Luc
    Vianu, Victor
    [J]. ACM TRANSACTIONS ON DATABASE SYSTEMS, 2010, 35 (03):