628 views
2 votes
2 votes

R(, b, c) with n tuples, S(A , D, E). How many max tuples in R natural join S? {A is key for both}

  1. $\min (m,n)$
  2. $\max(m,n)$
  3. $m*n$
  4. $m+n$

2 Answers

Best answer
6 votes
6 votes

Relation R(, b, c)

A B C
1  ani hi
2 cse you
3 mca me

Relation S(, D, E).

A D E
1  ani hi
2 cse you

Performing Natural Join: $\pi (\sigma( R\times S))$ 

A B C A D E
1 ani hi 1 ani  hi
ani hi 2 cse you
2 cse you 1 ani hi
2 cse you 2 cse you
3 mca me 1 ani hi
3 mca me 1 cse you

Result:

A B C A D E
1 ani hi 1 ani  hi
2 cse you 2 cse you

So only 2 rows comes as result satisfy by option A min(R,S) = S here.

selected by
1 votes
1 votes

Actually the question is asking about the max tuples in R natural join S.
so R natural join S  will only give max tuple when the

*    elements of the A(key of R)  are  the subset of the elements of the A ( key of S)
                              OR
*    
elements of the A(key of S)  are  the subset of the elements of the A  ( key of R)
if we will take either of the above scenario we will get the result i.e
  (A)        min (m,n)

Answer:

Related questions

0 votes
0 votes
1 answer
1
Deepak Joshi asked Oct 8, 2023
598 views
A database relation R has 10 attributes (A, B, C, D,..., J)."CDEF" is known to be a candidate key of relation R. There may be other candidate keys, which are unknown. Wha...
1 votes
1 votes
0 answers
2
JAINchiNMay asked Dec 1, 2022
439 views
Any attribute(s) determining a prime attribute, automatically becomes a prime(s) attributeTrue or false
0 votes
0 votes
1 answer
4
abhinowKatore asked Sep 8, 2022
261 views
If a schedule is not conflict-serializable. Is it serializable?