4 votes 4 votes Databases databases sql + – srestha asked Jan 29, 2018 srestha 577 views answer comment Share Follow See all 9 Comments See all 9 9 Comments reply braindead commented Jan 29, 2018 reply Follow Share I got 6, is it correct? 0 votes 0 votes Ashwani Kumar 2 commented Jan 29, 2018 reply Follow Share A D a d a c b b b d b c c b 6 tuples 0 votes 0 votes srestha commented Jan 29, 2018 reply Follow Share What R join S is returning? A B C D a a a b b a a b c c c d c c c c right? 0 votes 0 votes srestha commented Jan 29, 2018 reply Follow Share now, $R\times S$=9 tuples Among which 4 is subtracting So, 9-4=5 should be ans Where am I wrong? 0 votes 0 votes Ashwani Kumar 2 commented Jan 30, 2018 reply Follow Share Your natural join is correct...but when you project columns $BD$ from it, there will be a duplicate tuple $<a,b>$ hence needs to be counted once and remaining two are $<c,d>$ and $<c,c>$, so there are 3 tuples here. On subtracting from $R*S = 9-3 = 6$ tuples 0 votes 0 votes srestha commented Jan 30, 2018 reply Follow Share yes, thanks bad mistake :( 0 votes 0 votes ninja_hattori commented Mar 27, 2018 reply Follow Share what does A <-- B mean ? 0 votes 0 votes srestha commented Mar 27, 2018 reply Follow Share B depends on A 0 votes 0 votes Prateek Raghuvanshi commented Jul 12, 2018 reply Follow Share @srestha B depends on A here we are using renaming operator simply replace B by A 0 votes 0 votes Please log in or register to add a comment.