On the Computational Complexity of Cardinality Constraints in Relational Databases

The theory of relational databases has attracted a great deal of attention recently [ 121. In this model data is arranged into one or more multi-column tables called relations. Each column corresponds to an attrihe. The values of the entries in a column are chosen from a set called the domain of the corresponding attribute. A relation is therefore a finite subset of the Cartesian product of the domains of its attributes. New relations can be constructed from given ones using certain algebraic operations on relations. If R is a relation, the a(R) is its set of attributes. If A E a(R), then Dom(Aj is the domain of the attribute A. Thus RQl A-(R) Dom(A). If t E R and X c a(R) then tx is a tuple t restricted to the attributes in X. The pojection on X of R is nx(R) = {tx I t E R}. The natural join is an ‘inverse’ of the projection operatsr, defined as follows: Let RI, . . . . Rm be relatio,r,S, then their natural join is defined as