edited by
9,533 views
5 votes
5 votes

Given R with n tuples S with m tuples n<m  then How many minimum and maximum tuples in follwing relations . Please Justify with Reason / Examples

  • R-S
  • S-R
  • R Left Join S
  • R  Natural Join S
  • R/S
  • S/R
edited by

1 Answer

4 votes
4 votes

[Someone should verify . This is what I think]

1. R UNION S

  • max : n+m
    Reason : union we add all the tuples from both relations. ie When R and S have no common tuple.

  • min: n
    Reason : The minimum is n (the greatest of the two sizes, m and n). When all the tuples of R also exist in S.

2. R INTERSECTION S

  • max : m ( m<n )
    Reason : both relation contains same tuples then we may get maximum m keys

  • min: 0
    Reason : taking m=n=null if no common tuples in both relations

3. R - S

  • max : m 
    Reason : if they are disjoint then in R-S we will get all tuples of R

  • min: 0
    Reason : if all tuples in R is also present in S
     

4. S - R

  • max : n 
    Reason : as explained above
     

  • min: n-m
    Reason : m<n  there will be some tuples in S after deleting the common tuples

5. R natural join S

  • max : n*m
    Reason :  if no matching key constraints natural join will produce Cartesian product )
     

  • min:  0
    Reason : Identical with case 2 (INTERSECTION).

6. R LEFT OUTER JOIN S

  • max : m*n
    Reason : if all rows in left tables matches with all rows in right table

  • min: m  (could be 0 when m= 0)
    Reason : The minimum is 1 when m=1 , minimum is 2 when m=2, minimum is 0 when m=0

7. R / S

  • max : m 
    Reason :   when n=0

  • min: 0
    Reason :  Consider that relational division is similar to integer division. 3 / 7 gives 0 in integer division for example. Try to convert this into relational division

Related questions

5 votes
5 votes
4 answers
1
learncp asked Sep 5, 2015
3,323 views
Why is the maximum number of tuples in full outer join equal to m*n, where m is the number of attributes in one relation and n is the attribute count in other ?Can someon...
3 votes
3 votes
2 answers
3
iarnav asked Dec 6, 2017
1,255 views
Say we have two relations R (a,b,c) and S (b,d,e).Now, R has 200 tuples and S has 300 tuples. What will be Minimum number of tuples when we do R ⋈ S ( ⋈ = Natural Joi...
0 votes
0 votes
0 answers
4
Shreya2002 asked Aug 9, 2022
670 views
Consider a relation schema r(A, B, C). Number of elements in domain of attributes A, B and C are 4, 10 and 17 respectively. “ Minimum ” number of tuples possible in a...