532 views
0 votes
0 votes
If R1  have  120 tuples R2 have 100 tuples and R3 have 70 tuples then  R1⋈R2⋈R3 WILL BE?

1 Answer

2 votes
2 votes

Complete Question(According to  Divyanshum29):

R1 (A,B,C) R2 (C,D,E) R3 (F,G)  (bold one are keys)

If R1  have  120 tuples R2 have 100 tuples and R3 have 70 tuples then  R1⋈R2⋈R3 WILL BE?

(Note: A bit more information required but lets say asking for maximum tuples in result)

Answer:

First we will perform  R1 ⋈ R2 

R1 and R2 have common attribute, which is C and C is key of R2

So, Maximum No.of tuples in (R1 ⋈ R2) = 120. 

Now, ( R1 ⋈ R2 ) ⋈ R3  // there is no common attribute

(Note:If there are no attributes in common between two relations and you perform a natural join, it will return the Cartesian product of the two relations.)

=( R1 ⋈ R2 ) ⋈ R3

=120*70 = 8400 tuples

edited by

Related questions

0 votes
0 votes
1 answer
1
vishnu777 asked Nov 8, 2022
407 views
Can anyone explain in detail about the concepts of sencondary indexing in dbms??
0 votes
0 votes
1 answer
4
iarnav asked Nov 27, 2017
431 views
what does this line means - Let r and s be two relations over the relation schemes R and S respectively and R has attribute A.