Theory of Computing Systems

, Volume 44, Issue 4, pp 620–652 | Cite as

Modulo Constraints and the Complexity of Typechecking XML Views

Article

Abstract

The typechecking problem for transformations of relational data into tree data is the following: given a relational-to-XML transformation P, and an XML type d, decide whether for every database instance \(\mathcal{D}\) the result of the transformation P on \(\mathcal{D}\) satisfies d. TreeQL programs with projection-free conjunctive queries (see Alon et al. in ACM Trans. Comput. Log. 4(3):315–354, 2003) are considered as transformations and DTDs with arbitrary regular expressions as XML types.

A non-elementary upper bound for the typechecking problem was already given by Alon et al. (ACM Trans. Comput. Log. 4(3):315–354, 2003) (although in a more general setting, where equality and negation in projection-free conjunctive queries and additional universal integrity constraints are allowed).

In this paper we show that the typechecking problem is coNEXPTIME-complete.

As an intermediate step we consider the following problem, which can be formulated independently of XML notions. Given a set of triples of the form (φ,k,j), where φ is a projection-free conjunctive query and k,j are natural numbers, decide whether there exists a database \(\mathcal{D}\) such that, for each triple (φ,k,j) in the set, there exists a natural number α, such that there are exactly k+j*α tuples satisfying the query φ in \(\mathcal{D}\) . Our main technical contribution consists of a NEXPTIME algorithm for the last problem.

Keywords

Complexity Logic Relational databases Typechecking XML 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Abiteboul, S., Hull, R., Vianu, V.: Foundations of Databases. Addison-Wesley, Reading (1995) MATHGoogle Scholar
  2. 2.
    Alon, N., Milo, T., Neven, F., Suciu, D., Vianu, V.: Typechecking XML views of relational databases. ACM Trans. Comput. Log. 4(3), 315–354 (2003) CrossRefMathSciNetGoogle Scholar
  3. 3.
    Alon, N., Milo, T., Neven, F., Suciu, D., Vianu, V.: XML with data values: typechecking revisited. J. Comput. Syst. Sci. 66(4), 688–727 (2003) MATHCrossRefMathSciNetGoogle Scholar
  4. 4.
    Chlebus, B.S.: Domino-tiling games. J. Comput. Syst. Sci. 32(3), 374–392 (1986) MATHCrossRefMathSciNetGoogle Scholar
  5. 5.
    Clark, J., Murata, M.: Relax NG. http://www.relaxng.org
  6. 6.
    Ebbinghaus, H.-D., Flum, J.: Finite Model Theory. Springer, Berlin (1999) MATHGoogle Scholar
  7. 7.
    Engelfriet, J., Vogler, H.: Macro tree transducers. J. Comput. Syst. Sci. 31(1), 71–146 (1985) MATHCrossRefMathSciNetGoogle Scholar
  8. 8.
    Fernandez, M.F., Kadlyska, Y., Suciu, D., Morishima, A., Tan, W.C.: SilkRoute: A framework for publishing relational data in XML. ACM Trans. Database Syst. 27(4), 438–493 (2002). doi:0.1145/582410.582413 CrossRefGoogle Scholar
  9. 9.
    Frisch, A., Hosoya, H.: Towards practical typechecking for macro tree transducers. In: Arenas, M., Schwartzbach, M.I. (eds.) Database Programming Languages, 11th International Symposium, DBPL 2007. Vienna, Austria, 23–24 September 2007. Lecture Notes in Computer Science, vol. 4797, pp. 246–260. Springer, Berlin (2007) CrossRefGoogle Scholar
  10. 10.
    Maneth, S., Berlea, A., Perst, T., Seidl, H.: Xml type checking with macro tree transducers. In: Li, C. (ed.) Proceedings of the Twenty-fourth ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems (PODS), Baltimore, Maryland, USA, 13–15 June 2005, pp. 283–294. ACM, New York (2005) CrossRefGoogle Scholar
  11. 11.
    Maneth, S., Perst, T., Seidl, H.: Exact XML type checking in polynomial time. In: Schwentick, T., Suciu, D. (eds.) Proceedings of Database Theory—ICDT 2007, 11th International Conference, Barcelona, Spain, 10–12 January 2007. Lecture Notes in Computer Science, vol. 4353, pp. 254–268. Springer, Berlin (2007) Google Scholar
  12. 12.
    Martens, W., Neven, F.: On the complexity of typechecking top-down XML transformations. Theor. Comput. Sci. 336(1), 153–180 (2005) MATHCrossRefMathSciNetGoogle Scholar
  13. 13.
    Martens, W., Neven, F.: Frontiers of tractability for typechecking simple XML transformations. J. Comput. Syst. Sci. 73(3), 362–390 (2007) MATHCrossRefMathSciNetGoogle Scholar
  14. 14.
    Martens, W., Neven, F., Gyssens, M.: On typechecking top-down XML transformations: Fixed input or output schemas. Inf. Comput. 206(7), 806–827 (2008) MATHCrossRefMathSciNetGoogle Scholar
  15. 15.
    Martens, W., Neven, F., Schwentick, T., Bex, G.J.: Expressiveness and complexity of XML schema. ACM Trans. Database Syst. 31(3), 770–813 (2006) CrossRefGoogle Scholar
  16. 16.
    Milo, T., Suciu, D., Vianu, V.: Typechecking for XML transformers. J. Comput. Syst. Sci. 66(1), 66–97 (2003) MATHCrossRefMathSciNetGoogle Scholar
  17. 17.
    Murata, M., Lee, D., Mani, M., Kawaguchi, K.: Taxonomy of XML schema languages using formal language theory. ACM Trans. Internet Techn. 5(4), 660–704 (2005) CrossRefGoogle Scholar
  18. 18.
    W3C: Extensible Markup Language (XML) 1.0. http://www.w3.org/TR/xml (1999)
  19. 19.
    W3C: XML schema part 1: Structures. http://www.w3.org/TR/xmlschema-1 (2004)
  20. 20.
    Wieczorek, P.: Complexity of typechecking XML views of relational databases. In: Schwentick, T., Suciu, D. (eds.) Proceedings of Database Theory—ICDT 2007, 11th International Conference, Barcelona, Spain, 10–12 January 2007. Lecture Notes in Computer Science, vol. 4353, pp. 239–253. Springer, Berlin (2007) Google Scholar

Copyright information

© Springer Science+Business Media, LLC 2008

Authors and Affiliations

  1. 1.Institute of Computer ScienceUniversity of WrocławWrocławPoland

Personalised recommendations