Estimation of the Number of Tuples Satisfying a Query Expressed in Predicate Calculus Language

We present a statistic model which allows us to estimate the cardinality of queries and sub-queries expressed in Predicate Calculus language. In a first step, we deal with expressions formed only with an AND operator with n operands. We show how we can estimate recursively the cardinality of an expression with n operands in function of an expression of n-1 operands. The formulae giving the cardinalities are calculated under several hypotheses concerning the independence of criteria which determine sub-expressions, and those which define the relations. The parameters which must be known are : the cardinalities of the relations and of their projections on each argument; the probability for an element in the intersection of several projections of relations to be in a given projection of a relation (these parameters are called inter-relation quantified dependencies); the probability that several components of a tuple of a relation are equal; and the probability that the constants which appear in a query belong to the corresponding projections of the relations. In a second step, we extend the method to general expressions including the operators NOT and OR. Finally, we discuss the feasibility of the method.