The following functional dependencies hold for relations $R(A, B, C)$ and $S(B, D, E).$
The relation $R$ contains 200 tuples and the relation $S$ contains 100 tuples. What is the maximum number of tuples possible in the natural join $R \bowtie S$?
Natural join will combine tuples with same value of the common rows(if there are two common rows then both vaues must be equal to get into the resultant set). So by this defn: we can get at the max only $100$ common value.
B -> C means each B value is associated with precisely one C value, so to satisfy the functional dependency all the rows with same value can't occur
From the given set of functional dependencies, it can be observed that B is a candidate key of R. So all 200 values of B must be unique in R.
There is no functional dependency given for S.
To get the maximum number of tuples in output, there can be two possibilities for S.
1) All 100 values of B in S are same and there is an entry in R that matches with this value. In this case, we get 100 tuples in output.
2) All 100 values of B in S are different and these values are present in R also. In this case also, we get 100 tuples.
as B is key in R and in table S, B is Foreign key that referencing to B in R
we have to find maximum number of tuples possible so there may be case that in table S every tuple of Attribute B is same
and we know natural join will combine tuples with same value
Every tuple in S can find atmost 1 matching tuple (with the same B value) in R...
Since asked maximum number of tuples, we can assume that every tuple in S finds 1 tuple in R. In that case natural joined table will have 100 tuples.
If we want minimum number of tuples, we can assume that every tuple in S finds 0 tuples in R. In that case natural joined table will have 0 tuples.
here B is common in both relations R and S .B is key in relation R bcoz B closure determines(A,B,C) all attributes of R but non-key in relation S.
B is unique in rel R but repetetion allowed in rel S.
so maximum number of tuples possible in the natural join R⋈S depend on non-key
so 100 is ans
yes sir TRUE... working on it :). But this...