What’s Hard about XML Schema Constraints?
Data description for XML usually comes in the form of a type specification (e.g., a DTD) together with integrity constraints. XML Schema allows one to mix DTD features with semantic information, such as keys and foreign keys. It was shown recently [,] that the interaction of DTDs with constraints may be rather nontrivial. In particular, testing if a general specification is consistent is undecidable, but for the most common case of single-attribute constraints it is NP-complete, and linear time if no foreign keys are present.
However, XML Schema design did not adopt the form of constraints prevalent in the database literature, and slightly changed the semantics of keys, foreign keys, and unique constraints. In this paper we demonstrate the very costly effect of this slight change on the feasibility of consistency checking. In particular, all the known hardness results extend to the XML Schema case, but tractability results do not. We show that even without foreign keys, and with very simple DTD features, checking consistency of XML-Schema specifications is intractable.
KeywordsRegular Expression Consistency Check Integrity Constraint Consistency Problem Semistructured Data
Unable to display preview. Download preview PDF.
- 1.S. Abiteboul, P. Buneman and D. Suciu Data on the Web: From Relations to Semistructured Data and XML. Morgan Kaufman, 2000.Google Scholar
- 2.M. Arenas, W. Fan and L. Libkin. On verifying consistency of XML specifications. In PODS’02, pages 259–270.Google Scholar
- 3.P. Buneman, S. Davidson, W. Fan, C. Hara and W. Tan. Keys for XML. In WWW’10, 2001, pages 201–210.Google Scholar
- 4.P. Buneman, S. Davidson, W. Fan, C. Hara and W. Tan. Reasoning about Keys for XML. In DBPL, 2001.Google Scholar
- 6.S. Ceri, P. Fraternali, S. Paraboschi. XML: Current developments and future challenges for the database community. In EDBT 2000, pages 3–17.Google Scholar
- 7.W. Fan and L. Libkin. On XML integrity constraints in the presence of DTDs. In PODS’01, pages 114–125.Google Scholar
- 8.M. Garey and D. Johnson. Computers and Intractability: A Guide to the Theory of NP-Completeness. W. H. Freeman and Company, 1979.Google Scholar
- 9.D. Lee and W. W. Chu. Constraints-preserving transformation from XML document type definition to relational schema. In ER’2000, pages 323–338.Google Scholar
- 10.V. Vianu. A Web odyssey: From Codd to XML. In PODS’01, pages 1–15.Google Scholar
- 11.W3C. Extensible Markup Language (XML) 1.0. W3C Recommendation, Feb. 1998.Google Scholar
- 12.W3C. XML-Data, W3C Working Draft, Jan. 1998.Google Scholar
- 13.W3C. XML Path Language (XPath). W3C Working Draft, Nov. 1999.Google Scholar
- 14.W3C. XML Schema. W3C Recommendation, May 2001.Google Scholar