Soft Cardinality Constraints on XML Data

How Exceptions Prove the Business Rule
  • Flavio Ferrarotti
  • Sven Hartmann
  • Sebastian Link
  • Mauricio Marin
  • Emir Muñoz
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8180)


We introduce soft cardinality constraints which need to be satisfied on average only, and thus permit violations in a controlled manner. Starting from a highly expressive but intractable class, we establish a fragment that is maximal with respect to both expressivity and efficiency. More precisely, we characterise the associated implication problem axiomatically and develop a low-degree polynomial time decision algorithm. Any increase in expressivity of our fragment results in coNP-hardness of the implication problem. Finally, we extensively test the performance of our algorithm. The performance evaluation provides first-hand evidence that reasoning about expressive notions of soft cardinality constraints on XML data is practically efficient and scales well. Our results unleash soft cardinality constraints on real-world XML practice, where a little more semantics makes applications a lot more effective in contexts where exceptions to common rules may occur.


Inference Rule Target Node Soft Constraint Cardinality Constraint Path Expression 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Arenas, M., Fan, W., Libkin, L.: What’s Hard about XML Schema Constraints? In: Hameurlain, A., Cicchetti, R., Traunmüller, R. (eds.) DEXA 2002. LNCS, vol. 2453, pp. 269–278. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  2. 2.
    Arenas, M., Fan, W., Libkin, L.: On the Complexity of Verifying Consistency of XML Specifications. SIAM J. Comput. 38(3), 841–880 (2008)MathSciNetCrossRefzbMATHGoogle Scholar
  3. 3.
    Bohannon, P., Fan, W., Geerts, F., Jia, X., Kementsietsidis, A.: Conditional Functional Dependencies for Data Cleaning. In: ICDE, pp. 746–755. IEEE (2007)Google Scholar
  4. 4.
    Brown, K.: Soft consistencies for weighted csps. In: Proceedings of Soft 2003: 5th International Workshop on Soft. Constraints, Kinsale, Ireland (2003)Google Scholar
  5. 5.
    Buneman, P., Davidson, S.B., Fan, W., Hara, C.S., Tan, W.C.: Keys for XML. Computer Networks 39(5), 473–487 (2002)CrossRefGoogle Scholar
  6. 6.
    Ferrarotti, F., Hartmann, S., Link, S.: A Precious Class of Cardinality Constraints for Flexible XML Data Processing. In: Jeusfeld, M., Delcambre, L., Ling, T.-W. (eds.) ER 2011. LNCS, vol. 6998, pp. 175–188. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  7. 7.
    Ferrarotti, F., Hartmann, S., Link, S., Marin, M., Muñoz, E.: Performance Analysis of Algorithms to Reason about XML Keys. In: Liddle, S.W., Schewe, K.-D., Tjoa, A.M., Zhou, X. (eds.) DEXA 2012, Part I. LNCS, vol. 7446, pp. 101–115. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  8. 8.
    Franceschet, M., Gubiani, D., Montanari, A., Piazza, C.: From Entity Relationship to XML Schema: A Graph-Theoretic Approach. In: Bellahsène, Z., Hunt, E., Rys, M., Unland, R. (eds.) XSym 2009. LNCS, vol. 5679, pp. 165–179. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  9. 9.
    Hartmann, S.: Soft Constraints and Heuristic Constraint Correction in Entity-Relationship Modelling. In: Bertossi, L., Katona, G.O.H., Schewe, K.-D., Thalheim, B. (eds.) Semantics in Databases 2001. LNCS, vol. 2582, pp. 82–99. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  10. 10.
    Hartmann, S., Link, S.: Efficient reasoning about a robust XML key fragment. ACM Trans. Database Syst. 34(2) (2009)Google Scholar
  11. 11.
    Hartmann, S., Link, S.: Numerical constraints on XML data. Inf. Comput. 208(5), 521–544 (2010)MathSciNetCrossRefzbMATHGoogle Scholar
  12. 12.
    Meyer, J.J.C., Wieringa, R., Dignum, F.: The Role of Deontic Logic in the Specification of Information Systems. In: Logics for Databases and Information Systems, pp. 71–115. Kluwer (1998)Google Scholar
  13. 13.
    Preece, A.D., Chalmers, S., McKenzie, C., Pan, J.Z., Gray, P.M.D.: A semantic web approach to handling soft constraints in virtual organisations. Electronic Commerce Research and Applications 7(3), 264–273 (2008)CrossRefGoogle Scholar
  14. 14.
    Stewart, D.B., Khosla, P.K.: Mechanisms for Detecting and Handling Timing Errors. Commun. ACM 40(1), 87–93 (1997)CrossRefGoogle Scholar
  15. 15.
    Suciu, D.: XML Data Repository, University of Washington (2002),
  16. 16.
    Thalheim, B.: Integrity Constraints in (Conceptual) Database Models. In: Kaschek, R., Delcambre, L. (eds.) The Evolution of Conceptual Modeling. LNCS, vol. 6520, pp. 42–67. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  17. 17.
    Yu, C., Jagadish, H.V.: XML schema refinement through redundancy detection and normalization. VLDB J. 17(2), 203–223 (2008)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Flavio Ferrarotti
    • 1
  • Sven Hartmann
    • 2
  • Sebastian Link
    • 3
  • Mauricio Marin
    • 4
  • Emir Muñoz
    • 5
  1. 1.Victoria University of WellingtonNew Zealand
  2. 2.Clausthal University of TechnologyGermany
  3. 3.The University of AucklandNew Zealand
  4. 4.Yahoo! ResearchUSA
  5. 5.DERINational University of Ireland GalwayIreland

Personalised recommendations