Direct Access for Answers to Conjunctive Queries with Aggregation

被引:0
|
作者
Eldar, Idan [1 ]
Carmeli, Nofar [2 ]
Kimelfeld, Benny [1 ]
机构
[1] Technion Israel Inst Technol, Haifa, Israel
[2] Univ Montpellier, CNRS, LIRMM, INRIA, Montpellier, France
关键词
aggregate queries; conjunctive queries; provenance semirings; commutative semirings; annotated databases; direct access; ranking function; answer orderings; query classification;
D O I
10.4230/LIPIcs.ICDT.2024.4
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We study the fine-grained complexity of conjunctive queries with grouping and aggregation. For some common aggregate functions (e.g., min, max, count, sum), such a query can be phrased as an ordinary conjunctive query over a database annotated with a suitable commutative semiring. Specifically, we investigate the ability to evaluate such queries by constructing in log-linear time a data structure that provides logarithmic-time direct access to the answers ordered by a given lexicographic order. This task is nontrivial since the number of answers might be larger than log-linear in the size of the input, and so, the data structure needs to provide a compact representation of the space of answers. In the absence of aggregation and annotation, past research provides a sufficient tractability condition on queries and orders. For queries without self-joins, this condition is not just sufficient, but also necessary (under conventional lower-bound assumptions in fine-grained complexity). We show that all past results continue to hold for annotated databases, assuming that the annotation itself is not part of the lexicographic order. On the other hand, we show infeasibility for the case of count-distinct that does not have any efficient representation as a commutative semiring. We then investigate the ability to include the aggregate and annotation outcome in the lexicographic order. Among the hardness results, standing out as tractable is the case of a semiring with an idempotent addition, such as those of min and max. Notably, this case captures also count-distinct over a logarithmic-size domain.
引用
收藏
页数:20
相关论文
共 50 条
  • [1] Tractable Orders for Direct Access to Ranked Answers of Conjunctive Queries
    Carmeli, Nofar
    Tziavelis, Nikolaos
    Gatterbauer, Wolfgang
    Kimelfeld, Benny
    Riedewald, Mirek
    PODS '21: PROCEEDINGS OF THE 40TH SIGMOD-SIGACT-SIGAI SYMPOSIUM ON PRINCIPLES OF DATABASE SYSTEMS, 2021, : 325 - 341
  • [2] Direct Access for Conjunctive Queries with Negations
    Capelli, Florent
    Irwin, Oliver
    27TH INTERNATIONAL CONFERENCE ON DATABASE THEORY, ICDT 2024, 2024, 290
  • [3] DIVERSITY OF ANSWERS TO CONJUNCTIVE QUERIES
    Merkl, Timo camillo
    Pichler, Reinhard
    Skritek, Sebastian
    LOGICAL METHODS IN COMPUTER SCIENCE, 2025, 21 (01) : 1 - 35
  • [4] Tractable counting of the answers to conjunctive queries
    Pichler, Reinhard
    Skritek, Sebastian
    JOURNAL OF COMPUTER AND SYSTEM SCIENCES, 2013, 79 (06) : 984 - 1001
  • [5] Generalizing Conjunctive Queries for Informative Answers
    Inoue, Katsumi
    Wiese, Lena
    FLEXIBLE QUERY ANSWERING SYSTEMS, 2011, 7022 : 1 - 12
  • [6] Approximately Counting Answers to Conjunctive Queries with Disequalities and Negations
    Focke, Jacob
    Goldberg, Leslie ann
    Roth, Marc
    Zivny, Stanislav
    ACM TRANSACTIONS ON ALGORITHMS, 2025, 21 (01)
  • [7] Approximately Counting Answers to Conjunctive Queries with Disequalities and Negations
    Focke, Jacob
    Goldberg, Leslie Ann
    Roth, Marc
    Zivny, Stanislav
    PROCEEDINGS OF THE 41ST ACM SIGMOD-SIGACT-SIGAI SYMPOSIUM ON PRINCIPLES OF DATABASE SYSTEMS (PODS '22), 2022, : 315 - 324
  • [8] Incrementally computing ordered answers of acyclic conjunctive queries
    Kimelfeld, Benny
    Sagiv, Yehoshua
    NEXT GENERATION INFORMATION TECHNOLOGIES AND SYSTEMS, PROCEEDINGS, 2006, 4032 : 141 - 152
  • [9] A system for tractable computation of negative answers to conjunctive queries
    Du, Jianfeng
    Liu, Deqian
    Lin, Can
    Zhou, Xuzhi
    Liang, Jiaqi
    Communications in Computer and Information Science, 2014, 480 : 56 - 66
  • [10] Optimal Algorithms for Ranked Enumeration of Answers to Full Conjunctive Queries
    Tziavelis, Nikolaos
    Ajwani, Deepak
    Gatterbauer, Wolfgang
    Riedewald, Mirek
    Yang, Xiaofeng
    PROCEEDINGS OF THE VLDB ENDOWMENT, 2020, 13 (09): : 1582 - 1597