retagged by
26,145 views
74 74 votes

The following functional dependencies hold for relations $R(A, B, C)$ and $S(B, D, E).$ 

  • $ B \to A$
  • $A \to C$

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$?

  1. $100$
  2. $200$
  3. $300$
  4. $2000$

11 Answers

Best answer
61 61 votes

Relation \( R(A, B, C) \):

  • Functional Dependencies: \( B \to A \), \( A \to C \)
  • From these dependencies, \( B \) is a candidate key for \( R \) because it determines all attributes in \( R \). Therefore, each value of \( B \) in \( R \) is unique. 

Relation \( S(B, D, E) \):

  • No specific functional dependencies are given for \( S \), so we have no constraints on the values of \( B \) in \( S \). 
  • Relation \( R \) contains 200 tuples. - Relation \( S \) contains 100 tuples. 

The natural join \( R \bowtie S \) will combine tuples from \( R \) and \( S \) that have the same value for the attribute \( B \), which is common to both relations. Since \( B \) is a candidate key in \( R \), each value of \( B \) in \( R \) is unique. Thus, \( R \) can have at most 200 unique values of \( B \). For the maximum number of tuples in the join, we want every tuple in \( S \) to find a matching tuple in \( R \). This is possible if all 100 values of \( B \) in \( S \) are also present in \( R \). 

The maximum number of tuples in the natural join \( R \bowtie S \) is determined by the number of tuples in \( S \) that can successfully match tuples in \( R \) based on the common attribute \( B \). Since \( S \) has 100 tuples, and we assume that all values of \( B \) in \( S \) are present in \( R \), the maximum number of tuples in the join is 100.  Therefore, the correct answer is: (A) 100.

edited by
68 68 votes

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.

22 22 votes

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

8 8 votes

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.

2 2 votes
Give FD is lossless join as B is the key in one table and it is common attribute for the table so the maximum no. of tupples will be 100 in natural join of R & S.
2 2 votes

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

Answer:
Position:
Show:

Related questions

48 48 votes
5 answers 5 answers
16.5k
16.5k views
go_editor asked Sep 30, 2014
16,496 views
Consider the following schedule for transactions $T1, T2$ and $T3:$$$\begin{array}{|c|c|c|}\hline \textbf{T1} & \textbf{T2} & \textbf{T3} \\\hline \text{Read(X)} & \text...
72 72 votes
8 answers 8 answers
33.3k
33.3k views
go_editor asked Sep 29, 2014
33,319 views
Which of the following concurrency control protocols ensure both conflict serializability and freedom from deadlock?$2$-phase lockingTime-stamp orderingI onlyII onlyBoth ...
48 48 votes
2 answers 2 answers
13.1k
13.1k views
go_editor asked Sep 29, 2014
13,083 views
A relational schema for a train reservation database is given below.passenger(pid, pname, age)reservation(pid, class, tid)$$\overset{\text{Passenger}}{\begin{array}{|c|c|...
97 97 votes
10 answers 10 answers
40.5k
40.5k views
go_editor asked Apr 21, 2016
40,475 views
A computer system has an $L1$ cache, an $L2$ cache, and a main memory unit connected as shown below. The block size in $L1$ cache is $4$ words. The block size in $L2$ cac...