0

Given two relations R(A,B) with r tuples, S(B,C) with s tuples (r>0, s>0), find the min and max number of tuples in this relation:

R U πA,B ( R⋈S )

Given options are:

  • -min:r, max:r+s
  • -min:0, max:r
  • -min:min(r,s), max:max(r,s)
  • -min:r, max:r

Now I know the individual max and min of both union(min=max(r,s) and max=r+s) and join(min=0 max=s) and I know that min and max of πA,B ( R⋈S ) are 0 and r*s but I can't find my way in this combined relation.
Thanks in advance!

0
2

In general a Union doesn't 'filter out' any tuples, then the cardinality of the result is at least the cardinality of the higher-cardinality operand.

The Projection is on to the original heading of R, so it can't produce any more tuples than were in R, neither can it produce tuples that weren't already in R.

Then the answer is -min:r, max:r .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.