59 59 votes Consider the relations $r_{1}\text{(P, Q, R)}$ and $r_{2}\text{(R, S, T)}$ with primary keys $\text{P}$ and $\text{R}$ respectively. The relation $r_{1}$ contains $2000$ tuples and $r_{2}$ contains $2500$ tuples. The maximum size of the join $r_1⋈ r_2$ is : $2000$ $2500$ $4500$ $5000$ Databases gateit-2006 databases joins natural-join normal + – Ishrat Jahan 28.9k views answer comment Share Follow Print See all 4 Comments 4 4 Comments reply JashanArora commented Feb 28, 2020 reply Follow flag Attribute R in relation r1 is assumed to be a Foreign Key referencing attribute R in relation r2. 6 6 replyShare shashankrustagi commented Jan 20, 2021 reply Follow flag Repeatetive question INfact, both the minimum and maximum cardinality will be min(A,B) as R is common attribute in both the tables minimum when In r1 table, R attribute is having same entry i.e. 1 maximum when in R1 table, R attribute is having different entry for each tuple, then also 2000 will be the answer 2 2 replyShare P0535_Yedidyah_Sagar commented Aug 22, 2025 i edited by P0535_Yedidyah_Sagar Aug 22, 2025 reply Follow flag Minimum and Maximum is 2000 (If we assume R in r1 is FK) If this is not assumed, minimum is 0, max is still 2000 (because of the constraint that, R is primary key in r2) 4 4 replyShare P0535_Yedidyah_Sagar commented Aug 22, 2025 reply Follow flag @shashankrustagiActually, it will always be size of the relation table which contains the foreign key 2 2 replyShare Please log in or register to add a comment.
Best answer 60 60 votes The common attribute is $\text{R}$ and it is the primary key in the second relation. So $\text{R}$ value should be distinct (primary key implies unique) for $2500$ rows. Hence when we do join, maximum possible number of tuples is $2000.$ Correct option is A. Sankaranarayanan P.N answered Nov 14, 2014 • edited Jun 3, 2021 by Lakshman Bhaiya Sankaranarayanan P.N comment Share Follow See all 33 Comments 33 33 Comments reply Show 30 previous comments PreyumKr commented Dec 28, 2023 reply Follow flag What if the R value in R2 is not primary and all values of R is same in r2 and that value is present in R1. Then if only one row or R1 has that common value then answer will be 2500 ? and if all the rows in r1 also has the same value then answer will be 2000*2500 = 5000000 ??? 1 1 replyShare Aditya_Khopade commented Aug 13, 2025 reply Follow flag For natural join we see for common attribute and join, also in natural join we don't include the nulls wala records. Since que doesn't mention as such any details so considered the case that 2000 tuples match with R2 and rest tuples in r2 are might be null so not considered in natural join. 0 0 replyShare amanbadone0 commented Sep 13, 2025 reply Follow flag @PreyumKr yes you are true, its one heck of a question that ccould and shouuld be asked in Gate . bc for every tuple in R1 will be clubbed with every other tuple in R2. the only thing thats stopping it in this questions case is the fact that R is a primary ket in R2 hence forced to be unique. 0 0 replyShare Please log in or register to add a comment.
15 15 votes Let us see two scenarios with small number of tuples r1 having 5 tuples and r2 with 3 tuples.Scenario 1: when all the attributes in R in r1 do not match value of R in r2.r1PQR5m16n27o28p59q6r2RST1am2bn3cunatural join on r1 and r2 would give mePQRST5m1am6n2bn702bnScenario 2: There are no uncommon values for R between r1 and r2PQR5m16n27o28p29q1Natural join would givePQRST5m1am6n2bn7o2bn8p2bn9q1amSo in this case we get the max number of tuples ,which is equal to the max number of tuples in relation r1.Generalizing this inference we can derive that ans is a)2000 =max no of tuples in r1. Jarvis answered May 27, 2015 • edited May 27, 2015 by Jarvis Jarvis comment Share Follow See all 5 Comments 5 5 Comments reply Show 2 previous comments srestha commented Feb 21, 2018 reply Follow flag In the answer given tuples are not correct I think Foreign key always refer a primary key then how 5,6 possible for R which are not in primary key? P Q R 5 m 1 6 n 2 7 o 2 8 p 5 9 q 6 0 0 replyShare ShivangiChauhan commented Dec 4, 2020 reply Follow flag @srestha Yes you are correct 5,6 are not present in R of r2, R of r1 should always refer to R of r2 bcoz it is a foreign key. 0 0 replyShare rhl commented Feb 28, 2023 reply Follow flag @srestha a small thing. foreign key always refer a primary key. I think the primary key should be replaced by the candidate key in the above sentence. 0 0 replyShare Please log in or register to add a comment.
3 3 votes See the image below carefully in order to understand that the maximum cardinality of join operation is minimum tuples of R1,R2 shashankrustagi answered Nov 18, 2020 shashankrustagi comment Share Follow See 1 comment 1 1 comment reply vermavijay1986 commented Sep 5, 2021 reply Follow flag The generalization concluded is wrong , think about it. 1 1 replyShare Please log in or register to add a comment.
1 1 vote Maximum number of tuples or size of the join is 2000 i.e. number of tuples in r1. Setika Mehra answered Nov 15, 2020 Setika Mehra comment Share Follow 0 reply Please log in or register to add a comment.
1 1 vote BEST ANSWERr1(P, Q, R) P and R are Primary key so all Tuples are uniqueTotal tuples= 2000 r2(R, S, T) Total tuples= 2500 R is common attribute in both the tablesthe minimum and maximum cardinality will be Min(r1,r2) = Min(2000, 2500) = 2000So correct answer is (a) i.e 2000 akshay_123 answered Jun 25, 2025 akshay_123 comment Share Follow 0 reply Please log in or register to add a comment.