0 votes 0 votes Consider the relationP(A,B,C),Q(C,D,E),R(E,F) having tuples 200, 300 and 100 respectively. The number of tuples in relation P join Q join R are ______. srestha asked Sep 18, 2016 • edited Sep 18, 2016 by srestha srestha 699 views answer comment Share Follow See all 9 Comments See all 9 9 Comments reply Show 6 previous comments srestha commented Sep 18, 2016 reply Follow Share you made 300 based on Primary key,rt? And primary keys gives the minimum no. of tuples. I have done based on foreign key, which gives maximum value. So, my answer should give maximum number of tuples.rt? Then why here just reverse answer? 0 votes 0 votes vijaycs commented Sep 18, 2016 reply Follow Share hahaha. : ) Check my comment again ... I too have considered FK ... and used same logic as yours, But the difference is I have done first (Q join P) and you have done (P join Q), even then ans should be same because join is commutative. But I have assumed different PK and FK ... 1 votes 1 votes srestha commented Sep 18, 2016 reply Follow Share hm, rt. Conclusion : question is incomplete :P 1 votes 1 votes Please log in or register to add a comment.
3 votes 3 votes IF question is asked for maximum number of tuples and key constraintes can be imagined then the solution is as follows . P and Q is related by C Q and R is related by E => min (300,100) = 100 P and ( Qand R ) => min(200,100) = 100 Only 100 rows will be outputed . Note : Natural Join Return min of two coloums if refertial integrity contraints holds good. Given Question is ambigous without proper details Reference : https://gateoverflow.in/2344/gate2010_43 pC answered Sep 18, 2016 pC comment Share Follow See all 2 Comments See all 2 2 Comments reply srestha commented Sep 18, 2016 reply Follow Share This reference will not follow this question 1 votes 1 votes vijaycs commented Sep 18, 2016 reply Follow Share Yes, Question seems incomplete. Either question should ask us to find maximum/min touple or it should provide some info about commont elements between relations (like- CK, FK).. 2 votes 2 votes Please log in or register to add a comment.