Efficiently Bounding Cardinality Ratios through Database Constraints Paolo Ciaccia, Matteo Golfarelli, and Stefano Rizzi DEIS, University of Bologna, Italy Abstract. Numerical dependencies (NDs) are a type of database con- straints in which one limits the number of distinct Y -values that can appear together with any X-value, where both X and Y are sets of at- tributes. The seminal work by Grant and Minker has shown that NDs are not finitely axiomatizable, which has cut further investigation on this kind of constraints. In this paper we show that, given a set of sound in- ference rules similar to those used for functional dependencies, the mem- bership problem for NDs is NP-hard, and propose a branch & bound algorithm for efficiently solving the problem. The algorithms adopts a suite of optimization strategies that make it applicable in practice, pro- viding considerable speed-up over a na¨ ıve approach. 1 Introduction Reasoning with database constraints has a huge number of practical applica- tions. These include database design, query processing and optimization, schema matching, data lineage and repair, to name just a few. Consequently, properly understanding the properties of a given type of constraints has always been a major topic in database theory. Cardinality constraints are a remarkable class that has been investigated in a variety of specific settings. For instance, in the context of the Entity-Relationship model, [8] studies the problem of determining when a set of cardinality ratio constraints, imposing restrictions on the mappings between entities and relationships, are consistent, i.e., no entity or relationship is compelled to be empty in all the legal instances of the schema. In [6] the focus is on cardinality constraints that impose restrictions on the number of relationships an object can be involved in. The entailment problem (i.e., checking whether a given constraint set entails further constraints) is faced, and combinatorial meth- ods for reasoning about sets of cardinality constraints are proposed. Similarly, in [7] the satisfiability and implication problems for numerical constraints are faced with reference to the XML language. A numerical constraint is defined in terms of path expressions, and restricts the number of nodes that have the same values on some selected subnodes. In this paper we consider a specific type of cardinality constraints, called numerical dependencies (NDs), which were introduced by Grant and Minker in [5]. Intuitively, given two sets of attributes X and Y , there is an ND from X to Y if each value of X can never be associated to more than k distinct values of Y ,