in Databases edited by
1,779 views
2 votes
2 votes

Consider relation ‘R’ and ‘S’ have ‘n’ and ‘m’ tuples, respectively. Choose the best matching between List-I (Expression) and List-II (Maximum number of tuple): 

Soln. According to me Answer should be Option C.

1.R union S = m+n (easy nothing to say)

2.     Say Relations are like:- R(A,B,C)  s(C,D)

               R                                   S

        A     B     C                      C         D

        1      2      3                      3          4

        2     3       3                      3          5

        4     3       3                      3          6

Now in R natual join S = m * n 

So option C should suffice isn't it ?

in Databases edited by
by
1.8k views

4 Comments

Verma Ashish yes right !!

0
0
Magma i have one doubt- your first comment implies that (R) is correct.

But it seems to be invalid i never see cross product on selection codition..it is perfectly valid if it is projection..because result of projection is also a relation..

Correct me if I'm wrong .
0
0

Verma Ashish 

see the ( ) on Relation R

ist it just execute selection condition on R then it does cartesian product

0
0

3 Answers

0 votes
0 votes

d is Right answer

P- 4 is obvious so no need to explain this. 

Q – 3 because natural join compare the common attribute so the best case would be- all of matches the condition and combine min(m,n) since all tuples are matching extra number of tuples in either of relation will be discarded

R – 2 explanation - because for maximum number of tuple the best case would be – that all tuples in R satisfy the given condition and then got cross product with S and we know that number of tuples in cross product m x n

S – 1 the best case for maximum tuples would be if nothing get minus or discarded from relation R with n tuples so max tuples = n

edited by
0 votes
0 votes
The answer will be option “d”  as the question has asked about the maximum number of tuples.

In option R, if the condition is satisfied by all the tuples of relation R then maximum number can be m*n.

In option Q, the minimum of R,S is found, as first cartesian product is done and then common tuples are shown.
0 votes
0 votes

No correct option.

  1. m + n
  2. m*n because if all tuples of common attribute is same then it will act as Cartesian product
  3. m*n for maximum tuples we assume condition c doesn’t filter any tuples.
  4. n for maximum we assume R has all tuples of L attribute distinct and R and S is disjoint set

Related questions