1 votes 1 votes consider $r1(A,B,C),r2(C,D,E)$ and $r3(F,G)$ with primary key $A,C,F, r1$ has $150 ,r2$ has $100$ and $r3$ has $75$ tuples the number of tuples in $r1$ natural join $r2$ natural join $r3?$ Databases databases natural-join + – Abhisek Tiwari 4 asked Nov 29, 2018 • edited Nov 29, 2018 by Lakshman Bhaiya Abhisek Tiwari 4 795 views answer comment Share Follow See all 8 Comments See all 8 8 Comments reply Lakshman Bhaiya commented Nov 29, 2018 reply Follow Share $r1\Join_{<c=c>} r2$ is possible and it gives $150$ tuples in $r3(F, G)$, there is no common attribute, how we can perform JOIN Operation? 0 votes 0 votes Shubhgupta commented Nov 29, 2018 reply Follow Share when there is no common attribute. natural join works as cross product. 1 votes 1 votes Lakshman Bhaiya commented Nov 29, 2018 reply Follow Share Yes, so $150\times 75=11,250$ is the correct answer? 1 votes 1 votes Shubhgupta commented Nov 29, 2018 reply Follow Share yes 11250 should be the answer. 0 votes 0 votes Lakshman Bhaiya commented Nov 29, 2018 reply Follow Share Here I take a simple example to understand clearly. In given example $R_{1}(\underline{A},B,C)\Join _{<C=C>}R_{2}(\underline{C},D,E)$ gives $150$ tuples. Lets $R_{4}(\underline{A},B,C,D,E)\Join R_{3}(\underline{F},G)$ There is no common attribute between $R_{4}$ and $R_{3}$, So, in this case, Natural Join work as Cross product. So, finally the number of tuples $=150\times 75=11,250$ 2 votes 2 votes Abhisek Tiwari 4 commented Nov 30, 2018 reply Follow Share @Shubhgupta Are u sure when no common attribute Cross Product ???Somewhere on GO already i have seen it will return empty relation. 0 votes 0 votes Rishav Kumar Singh commented Nov 30, 2018 reply Follow Share Abhisek Tiwari 4 when attributes name is common and no match found in entries then it will be 0. But if no common attribute then natural join will be CP 2 votes 2 votes Lakshman Bhaiya commented Nov 30, 2018 reply Follow Share @ Abhisek Tiwari 4 Natural join will return the output of the cross product when no common attribute in two different relations. You can run the query and check it 1 votes 1 votes Please log in or register to add a comment.
0 votes 0 votes 7500 100 A join B Then 75 B join C twin_123 answered Nov 29, 2018 twin_123 comment Share Follow See 1 comment See all 1 1 comment reply Lakshman Bhaiya commented Nov 29, 2018 reply Follow Share twin_123 can you explain? how you got $7500?$ 0 votes 0 votes Please log in or register to add a comment.