Advertisement

Structural Decomposition Methods: Key Notions and Database Applications

  • G. GrecoEmail author
  • N. Leone
  • F. Scarcello
  • G. Terracina
Chapter
Part of the Studies in Big Data book series (SBD, volume 31)

Abstract

Many difficult problems that are tractable when restricted to acyclic instances are good candidates to be solved efficiently whenever their structure is not precisely acyclic, but not far from that. This is the case for fundamental database problems such as answering conjunctive queries or counting the number of answers (without actually computing them). The chapter describes structural decomposition methods that guarantee tractability for all such problem instances whose associated hypergraphs have a small degree of cyclicity, called width. In particular, it focuses on the notion of hypertree width, by describing its properties and its applications to the database field, and covering queries with aggregate operators and some recent parallel and distributed implementations.

Notes

Acknowledgements

The work was supported by project “Ba2Know (Business Analytics to Know) Service Innovation - LAB”, No. PON03PE_00001_1 funded by the Italian Ministry of University and Research (MIUR), and by project “Smarter Solutions in the Big Data World (S2BDW)”, funded by the Italian Ministry for Economic Development (MISE) within the programme PON “Imprese e competitivitá” 2014–2020.

References

  1. 1.
    C.R. Aberger, S. Tu, K. Olukotun, C. Ré, EmptyHeaded: A relational engine for graph processing, in Proceedings of SIGMOD 2016 (2016)Google Scholar
  2. 2.
    C.R. Aberger, S. Tu, K. Olukotun, C. Ré, Old techniques for new join algorithms: A case study in RDF processing, in CoRR, arXiv:abs/1602.03557 (2016)
  3. 3.
    I. Adler, G. Gottlob, M. Grohe, Hypertree width and related hypergraph invariants. Eur. J. Comb. 28(8), 2167–2181 (2007)MathSciNetCrossRefzbMATHGoogle Scholar
  4. 4.
    F.N. Afrati, M. Joglekar, C. Ré, S. Salihoglu, J.D. Ullman, GYM: A multiround join algorithm in mapreduce, in CoRR, arXiv:abs/1410.4156 (2014)
  5. 5.
    M. Aref, B. ten Cate, T.J. Green, B. Kimelfeld, D. Olteanu, E. Pasalic, T.L. Veldhuizen, G. Washburn, Design and implementation of the logicblox system, in Proceedings of SIGMOD 2015 (2015), pp. 1371–1382Google Scholar
  6. 6.
    R. Barilaro, F. Ricca, G. Terracina, Optimizing the distributed evaluation of stratified programs via structural analysis, in Proceeding of 11th International Conference on Logic Programming and Nonmonotonic Reasoning (LPNMR 2011), Vancouver, Canada, 2011, Lecture Notes in Computer Science (Springer, Heidelberg, 2011), pp. 217–222Google Scholar
  7. 7.
    P.A. Bernstein, N. Goodman, Power of natural semijoins. SIAM J. Comput. 10(4), 751–771 (1981)MathSciNetCrossRefzbMATHGoogle Scholar
  8. 8.
    H.L. Bodlaender, A linear time algorithm for finding tree-decompositions of small treewidth, in Proceeding of STOC 1993 (1993), pp. 226–234Google Scholar
  9. 9.
    A.A. Bulatov, The complexity of the counting constraint satisfaction problem. J. ACM 60(5), 34:1–34:41 (2013)MathSciNetzbMATHGoogle Scholar
  10. 10.
    A.A. Bulatov, M. Dyer, L.A. Goldberg, M. Jerrum, C. Mcquillan, The expressibility of functions on the boolean domain, with applications to counting CSPs. J. ACM 60(5), 32:1–32:36 (2013)MathSciNetzbMATHGoogle Scholar
  11. 11.
    F. Calimeri, S. Perri, F. Ricca, Experimenting with parallelism for the instantiation of ASP programs. J. Algorithms Cogn. Inf. Log. 63(1–3), 34–54 (2008)MathSciNetCrossRefzbMATHGoogle Scholar
  12. 12.
    H. Chen, S. Mengel, A trichotomy in the complexity of counting answers to conjunctive queries, in Proceeding of ICDT 2015 (2015), pp. 110–126Google Scholar
  13. 13.
    D.A. Cohen, P. Jeavons, M. Gyssens, A unified theory of structural tractability for constraint satisfaction problems. J. Comput. Syst. Sci. 74(5), 721–743 (2008)MathSciNetCrossRefzbMATHGoogle Scholar
  14. 14.
    V. Dalmau, P. Jonsson, The complexity of counting homomorphisms seen from the other side. Theory Comput. Syst. 329(1–3), 315–323 (2004)MathSciNetCrossRefzbMATHGoogle Scholar
  15. 15.
    J. Dean, S. Ghemawat, Mapreduce: A flexible data processing tool. Commun. ACM 53(1), 72–77 (2010)CrossRefGoogle Scholar
  16. 16.
    R. Dechter, Constraint Processing (Morgan Kaufmann Publishers Inc., 2003)Google Scholar
  17. 17.
    R. Dechter, N. Flerova, R. Marinescu, Search algorithms for M Best solutions for graphical models, in Proceeding of AAAI 2012 (2012), pp. 1895–1901Google Scholar
  18. 18.
    R. Fagin, Degrees of acyclicity for hypergraphs and relational database schemes. J. ACM 30(3), 514–550 (1983)MathSciNetCrossRefzbMATHGoogle Scholar
  19. 19.
    W. Fischl, G. Gottlob, R. Pichler, General and fractional hypertree decompositions: Hard and easy cases, in CoRR, arXiv:abs/1611.01090 (2016)
  20. 20.
    L. Ghionna, L. Granata, G. Greco, F. Scarcello, Hypertree decompositions for query optimization, in Proceeding of ICDE 2007 (2007), pp. 36–45Google Scholar
  21. 21.
    L. Ghionna, G. Greco, F. Scarcello, H-DB: A hybrid quantitative-structural sql optimizer, in Proceeding of CIKM 2011 (2011), pp. 2573–2576Google Scholar
  22. 22.
    G. Gottlob, G. Greco, Decomposing combinatorial auctions and set packing problems. J. ACM 60(4), 24:1–24:39 (2013)MathSciNetCrossRefzbMATHGoogle Scholar
  23. 23.
    G. Gottlob, N. Greco, N. Leone, F. Scarcello, Hypertree decompositions: Questions and answers, in Proceeding of PODS 2016 (2016), pp. 57–74Google Scholar
  24. 24.
    G. Greco, F. Scarcello, Tractable optimization problems through hypergraph-based structural restrictions, in Proceeding of ICALP 2009 (2009), pp. 16–30Google Scholar
  25. 25.
    G. Gottlob, G. Greco, F. Scarcello, Treewidth and hypertree width, in Tractability: Practical Approaches to Hard Problems, ed. by L. Bordeaux, Y. Hamadi, P. Kohli (2012)Google Scholar
  26. 26.
    G. Gottlob, M. Grohe, N. Musliu, M. Samer, F. Scarcello, Hypertree decompositions: Structure, algorithms, and applications, in Proceeding of WG 2005 (2005), pp. 1–15Google Scholar
  27. 27.
    G. Gottlob, S.T. Lee, G. Valiant, P. Valiant, Size and treewidth bounds for conjunctive queries. J. ACM 59(3), 1–35 (2012)MathSciNetCrossRefzbMATHGoogle Scholar
  28. 28.
    G. Gottlob, N. Leone, F. Scarcello, Advanced parallel algorithms for acyclic conjunctive queries. Technical Report DBAI-TR-98/18, Technical University of Vienna (1998)Google Scholar
  29. 29.
    G. Gottlob, N. Leone, F. Scarcello, On tractable queries and constraints, in Proceeding of DEXA 1999 (1999), pp. 1–15Google Scholar
  30. 30.
    G. Gottlob, N. Leone, F. Scarcello, The complexity of acyclic conjunctive queries. J. ACM 48(3), 431–498 (2001)MathSciNetCrossRefzbMATHGoogle Scholar
  31. 31.
    G. Gottlob, N. Leone, F. Scarcello, Computing LOGCFL certificates. Theor. Comput. Sci. 270(1–2), 761–777 (2002)MathSciNetCrossRefzbMATHGoogle Scholar
  32. 32.
    G. Gottlob, N. Leone, F. Scarcello, Hypertree decompositions and tractable queries. J. Comput. Syst. Sci. (Conference Version has Appeared in PODS 1999) 64(3), 579–627 (2002)MathSciNetzbMATHGoogle Scholar
  33. 33.
    G. Gottlob, N. Leone, F. Scarcello, Robbers, marshals, and guards: Game theoretic and logical characterizations of hypertree width. J. Comput. Syst. Sci. 66(4), 775–808 (2003)MathSciNetCrossRefzbMATHGoogle Scholar
  34. 34.
    G. Gottlob, Z. Miklós, T. Schwentick, Generalized hypertree decompositions: NP-hardness and tractable variants. J. ACM 56(6), 30:1–30:32 (2009)MathSciNetCrossRefzbMATHGoogle Scholar
  35. 35.
    G. Greco, F. Scarcello, The power of tree projections: Local consistency, greedy algorithms, and larger islands of tractability, in Proceeding of PODS 2010 (2010), pp. 327–338Google Scholar
  36. 36.
    G. Greco, F. Scarcello, Structural tractability of constraint optimization, in Proceeding of CP 2011 (2011), pp. 340–355Google Scholar
  37. 37.
    G. Greco, F. Scarcello, Counting solutions to conjunctive queries: Structural and hybrid tractability, in Proceeding of PODS 2014 (2014), pp. 132–143Google Scholar
  38. 38.
    G. Greco, F. Scarcello, Greedy strategies and larger islands of tractability for conjunctive queries and constraint satisfaction problems. Inf. Comput. 252, 201–220 (2017)MathSciNetCrossRefzbMATHGoogle Scholar
  39. 39.
    G. Greco, F. Scarcello, The power of local consistency in conjunctive queries and constraint satisfaction problems. SIAM J. Comput. (2017)Google Scholar
  40. 40.
    M. Grohe, D. Marx, Constraint solving via fractional edge covers. ACM Trans. Algorithms 11(1), 4:1–4:20 (2014)MathSciNetCrossRefzbMATHGoogle Scholar
  41. 41.
    I.F. Ilyas, G. Beskales, M.A. Soliman, A survey of top-k query processing techniques in relational database systems. ACM Comput. Surv. 40(4), 11:1–11:58 (2008)CrossRefGoogle Scholar
  42. 42.
    M. Joglekar, R. Puttagunta, C. Ré, Aggregations over generalized hypertree decompositions, in Proceeding of PODS 2016 (2016)Google Scholar
  43. 43.
    M.R. Joglekar, C.M. Ré, It’s all a matter of degree: Using degree information to optimize multiway joins, in Proceeding of ICDT 2016 (2016), pp. 11:1–11:17Google Scholar
  44. 44.
    O. Kalinsky, Y. Etsion, B. Kimelfeld, Flexible caching in trie joins, in CoRR, arXiv:abs/1602.08721 (2016)
  45. 45.
    R.M. Karp, V. Ramachandran, Parallel algorithms for shared-memory machines, in Handbook of Theoretical Computer Science, vol. A (MIT Press, 1990), pp. 869–941Google Scholar
  46. 46.
    K. Kask, R. Dechter, J. Larrosa, A. Dechter, Unifying tree decompositions for reasoning in graphical models. Artif. Intell. 166(1–2), 165–193 (2005)MathSciNetCrossRefzbMATHGoogle Scholar
  47. 47.
    M.A. Khamis, H. Ngo, D. Suciu, Worst-case optimal algorithms for conjunctive queries with functional dependencies, in Proceeding of PODS 2016 (2016)Google Scholar
  48. 48.
    M.A. Khamis, H.Q. Ngo, C. Ré, A. Rudra, Joins via geometric resolutions: Worst-case and beyond, in Proceeding of PODS 2015 (2015), pp. 213–228Google Scholar
  49. 49.
    M.A. Khamis, H.Q. Ngo, A. Rudra. FAQ: Questions asked frequently, in Proceedings of PODS 2016 (2016)Google Scholar
  50. 50.
    B. Kimelfeld, Y. Sagiv, Incrementally computing ordered answers of acyclic conjunctive queries, in Proceedings of NGITS 2006 (2006), pp. 141–152Google Scholar
  51. 51.
    P.G. Kolaitis, Constraint satisfaction, databases, and logic, in Proceedings of IJCAI 2003 (2003), pp. 1587–1595Google Scholar
  52. 52.
    E.L. Lawler, A procedure for computing the k best solutions to discrete optimization problems and its application to the shortest path problem. Manag. Sci. 18(7), 401–405 (1972)MathSciNetCrossRefzbMATHGoogle Scholar
  53. 53.
    D. Marx, Approximating fractional hypertree width. ACM Trans. Algorithms 6(2), 29:1–29:17 (2010)MathSciNetCrossRefzbMATHGoogle Scholar
  54. 54.
    D. Marx, Tractable hypergraph properties for constraint satisfaction and conjunctive queries. J. ACM 60(6), 42:1–42:51 (2013)MathSciNetCrossRefzbMATHGoogle Scholar
  55. 55.
    J. Minker (ed.), Foundations of Deductive Databases and Logic Programming (Morgan Kaufmann Publishers Inc., Washington DC, 1988)zbMATHGoogle Scholar
  56. 56.
    H.Q. Ngo, C. Ré, A. Rudra, Skew strikes back: New developments in the theory of join algorithms. SIGMOD Rec. 42(4), 5–16 (2013)CrossRefGoogle Scholar
  57. 57.
    R. Pichler, S. Skritek, Tractable counting of the answers to conjunctive queries. J. Comput. Syst. Sci. 79(6), 984–1001 (2013)MathSciNetCrossRefzbMATHGoogle Scholar
  58. 58.
    O. Reingold, Undirected connectivity in log-space. J. ACM 55(4), 17:1–17:24 (2008)MathSciNetCrossRefzbMATHGoogle Scholar
  59. 59.
    N. Robertson, P. Seymour, Graph minors. II. Algorithmic aspects of tree-width. J. Algorithms 7(3), 309–322 (1986)MathSciNetCrossRefzbMATHGoogle Scholar
  60. 60.
    F. Scarcello, G. Greco, N. Leone, Weighted hypertree decompositions and optimal query plans. J. Comput. Syst. Sci. 73(3), 475–506 (2007)MathSciNetCrossRefzbMATHGoogle Scholar
  61. 61.
    R.E. Tarjan, M. Yannakakis, Simple linear-time algorithms to test chordality of graphs, test acyclicity of hypergraphs, and selectively reduce acyclic hypergraphs. SIAM J. Comput. 13(3), 566–579 (1984)MathSciNetCrossRefzbMATHGoogle Scholar
  62. 62.
    G. Terracina, N. Leone, V. Lio, C. Panetta, Experimenting with recursive queries in database and logic programming systems. Theory Pract. Log. Program. (TPLP) 8(2), 129–165 (2008)MathSciNetCrossRefzbMATHGoogle Scholar
  63. 63.
    L.G. Valiant, A bridging model for parallel computation. Commun. ACM 33(8), 103–111 (1990)CrossRefGoogle Scholar
  64. 64.
    T.L. Veldhuizen, Triejoin: A simple, worst-case optimal join algorithm, in Proceedings of ICDT 2014 (2014), pp. 96–106Google Scholar
  65. 65.
    M. Yannakakis, Algorithms for acyclic database schemes, in Proceedings of VLDB 1981 (1981), pp. 82–94Google Scholar

Copyright information

© Springer International Publishing AG 2018

Authors and Affiliations

  • G. Greco
    • 1
    Email author
  • N. Leone
    • 1
  • F. Scarcello
    • 1
  • G. Terracina
    • 1
  1. 1.University of CalabriaRendeItaly

Personalised recommendations