Enumeration Complexity of Conjunctive Queries with Functional Dependencies

  • Nofar CarmeliEmail author
  • Markus Kröll
Part of the following topical collections:
  1. Special Issue on Database Theory (2018)


We study the complexity of enumerating the answers of Conjunctive Queries (CQs) in the presence of Functional Dependencies (FDs). Our focus is on the ability to list output tuples with a constant delay in between, following a linear-time preprocessing. A known dichotomy classifies the acyclic self-join-free CQs into those that admit such enumeration, and those that do not. However, this classification no longer holds in the common case where the database exhibits dependencies among attributes. That is, some queries that are classified as hard are in fact tractable if dependencies are accounted for. We establish a generalization of the dichotomy to accommodate FDs; hence, our classification determines which combination of a CQ and a set of FDs admits constant-delay enumeration with a linear-time preprocessing. In addition, we generalize a hardness result for cyclic CQs to accommodate unary FDs, and further conclusions of our development include a dichotomy for enumeration with linear delay. Finally, we show that all our results apply also for CQs with disequalities and in the presence of cardinality dependencies that generalize FDs.


Enumeration Complexity Conjunctive queries Functional dependencies 



  1. 1.
    Abboud, A., Williams, V.V.: Popular conjectures imply strong lower bounds for dynamic problems. In: 2014 IEEE 55Th Annual Symposium on Foundations of Computer Science (FOCS), pp. 434–443. IEEE (2014)Google Scholar
  2. 2.
    Arapinis, M., Figueira, D., Gaboardi, M.: Sensitivity of counting queries. In: 43Rd International Colloquium on Automata, Languages, and Programming, ICALP 2016, pp. 120:1–120:13. Rome (2016)Google Scholar
  3. 3.
    Bagan, G., Durand, A., Grandjean, E.: On acyclic conjunctive queries and constant delay enumeration. In: International Workshop on Computer Science Logic, pp. 208–222. Springer (2007)Google Scholar
  4. 4.
    Beeri, C., Fagin, R., Maier, D., Yannakakis, M.: On the desirability of acyclic database schemes. J. ACM 30(3), 479–513 (1983). MathSciNetCrossRefzbMATHGoogle Scholar
  5. 5.
    Berkholz, C., Keppeler, J., Schweikardt, N.: Answering conjunctive queries under updates. In: Proceedings of the 36th ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems, PODS 2017, pp. 303–318. Chicago, May 14-19, 2017 (2017)Google Scholar
  6. 6.
    Brault-Baron, J.: De La Pertinence De Lénumération: Complexitéen Logiques Propositionnelle Et Du Premier Ordre. Ph.D. thesis, Université de Caen (2013)Google Scholar
  7. 7.
    Cao, Y., Fan, W., Wo, T., Yu, W.: Bounded conjunctive queries. PVLDB 7(12), 1231–1242 (2014)Google Scholar
  8. 8.
    Capelli, F., Strozecki, Y.: Incremental delay enumeration: Space and time. Discrete Applied Mathematics. (2018)
  9. 9.
    Carmeli, N., Kröll, M.: Enumeration complexity of conjunctive queries with functional dependencies. In: Kimelfeld, B., Amsterdamer, Y. (eds.) 21st International Conference on Database Theory (ICDT 2018), Leibniz International Proceedings in Informatics (LIPIcs), vol. 98, pp 11:1–11:17. Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik, Dagstuhl, Germany (2018).
  10. 10.
    Creignou, N., Kröll, M., Pichler, R., Skritek, S., Vollmer, H.: On the complexity of hard enumeration problems. In: Language and Automata Theory and Applications - 11Th International Conference, LATA 2017, pp. 183–195. Umeå (2017)Google Scholar
  11. 11.
    Durand, A., Schweikardt, N., Segoufin, L.: Enumerating answers to first-order queries over databases of low degree. In: Proceedings of the 33rd ACM SIGMOD-SIGACT-SIGART Symposium on Principles of Database Systems, PODS ’14, pp. 121–131 (2014)Google Scholar
  12. 12.
    Flum, J., Frick, M., Grohe, M.: Query evaluation via tree-decompositions. J. ACM 49(6), 716–752 (2002)MathSciNetCrossRefzbMATHGoogle Scholar
  13. 13.
    Grandjean, E.: Sorting, linear time and the satisfiability problem. Ann. Math. Artif. Intell. 16, 183–236 (1996). MathSciNetCrossRefzbMATHGoogle Scholar
  14. 14.
    Kimelfeld, B.: A dichotomy in the complexity of deletion propagation with functional dependencies. In: Proceedings of the 31st ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems, PODS ’12, pp 191–202. ACM, New York (2012).
  15. 15.
    Le Gall, F.: Powers of tensors and fast matrix multiplication. In: Proceedings of the 39th International Symposium on Symbolic and Algebraic Computation, ISSAC ’14, pp 296–303. ACM, New York (2014).
  16. 16.
    Lincoln, A., Williams, V.V., Williams, R.R.: Tight hardness for shortest cycles and paths in sparse graphs. In: Proceedings of the Twenty-Ninth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2018, pp. 1236–1252. New Orleans, January 7-10, 2018 (2018)Google Scholar
  17. 17.
    Papadimitriou, C.H., Yannakakis, M.: On the complexity of database queries. J. Comput. Syst. Sci. 58(3), 407–427 (1999)MathSciNetCrossRefzbMATHGoogle Scholar
  18. 18.
    Segoufin, L., Vigny, A.: Constant delay enumeration for FO queries over databases with local bounded expansion. In: 20Th International Conference on Database Theory, ICDT 2017, pp. 20:1–20:16. Venice (2017)Google Scholar
  19. 19.
    Williams, V.V., Williams, R.: Subcubic Equivalences between Path, Matrix and Triangle Problems. In: 51Th Annual IEEE Symposium on Foundations of Computer Science, FOCS 2010, pp. 645–654. Las Vegas (2010)Google Scholar

Copyright information

© Springer Science+Business Media, LLC, part of Springer Nature 2019

Authors and Affiliations

  1. 1.TechnionHaifaIsrael
  2. 2.TU WienViennaAustria

Personalised recommendations