The trichotomy of HAVING queries on a probabilistic database

The trichotomy of HAVING queries on a probabilistic database We study the evaluation of positive conjunctive queries with Boolean aggregate tests (similar to HAVING in SQL) on probabilistic databases. More precisely, we study conjunctive queries with predicate aggregates on probabilistic databases where the aggregation function is one of MIN, MAX, EXISTS, COUNT, SUM, AVG, or COUNT(DISTINCT) and the comparison function is one of =, ≠,≥,>,≤, or <. The complexity of evaluating a HAVING query depends on the aggregation function, α , and the comparison function, θ . In this paper, we establish a set of trichotomy results for conjunctive queries with HAVING predicates parametrized by ( α , θ ). For such queries (without self-joins), one of the following three statements is true: (1) the exact evaluation problem has $${\mathcal P}$$ -time data complexity. In this case, we call the query safe . (2) The exact evaluation problem is $${{\sharp{\mathcal P}}}$$ -hard, but the approximate evaluation problem has (randomized) $${{\mathcal P}}$$ -time data complexity. More precisely, there exists an FPTRAS for the query. In this case, we call the query apx-safe . (3) The exact evaluation problem is $${{\sharp{\mathcal P}}}$$ -hard, and the approximate evaluation problem is also hard. We call these queries hazardous . The precise definition of each class depends on the aggregate considered and the comparison function. Thus, we have queries that are ( MAX ,≥ )-safe, ( COUNT ,≤ )-apx-safe, ( SUM ,=)-hazardous, etc. Our trichotomy result is a significant extension of a previous dichotomy result for Boolean conjunctive queries into safe and not safe. For each of the three classes we present novel techniques. For safe queries, we describe an evaluation algorithm that uses random variables over semirings. For apx-safe queries, we describe an FPTRAS that relies on a novel algorithm for generating a random possible world satisfying a given condition. Finally, for hazardous queries we give novel proofs of hardness of approximation. The results for safe queries were previously announced (in Ré, C., Suciu, D. Efficient evaluation of. In: DBPL, pp. 186–200, 2007), but all other results are new. The VLDB Journal Springer Journals

The trichotomy of HAVING queries on a probabilistic database

Loading next page...
Copyright © 2009 by Springer-Verlag
Computer Science; Database Management
Publisher site
See Article on Publisher Site


You’re reading a free preview. Subscribe to read the entire article.

DeepDyve is your
personal research library

It’s your single place to instantly
discover and read the research
that matters to you.

Enjoy affordable access to
over 12 million articles from more than
10,000 peer-reviewed journals.

All for just $49/month

Explore the DeepDyve Library

Unlimited reading

Read as many articles as you need. Full articles with original layout, charts and figures. Read online, from anywhere.

Stay up to date

Keep up with your field with Personalized Recommendations and Follow Journals to get automatic updates.

Organize your research

It’s easy to organize your research with our built-in tools.

Your journals are on DeepDyve

Read from thousands of the leading scholarly journals from SpringerNature, Elsevier, Wiley-Blackwell, Oxford University Press and more.

All the latest content is available, no embargo periods.

See the journals in your area

Monthly Plan

  • Read unlimited articles
  • Personalized recommendations
  • No expiration
  • Print 20 pages per month
  • 20% off on PDF purchases
  • Organize your research
  • Get updates on your journals and topic searches


Start Free Trial

14-day Free Trial

Best Deal — 39% off

Annual Plan

  • All the features of the Professional Plan, but for 39% off!
  • Billed annually
  • No expiration
  • For the normal price of 10 articles elsewhere, you get one full year of unlimited access to articles.



billed annually
Start Free Trial

14-day Free Trial