1 votes 1 votes In the following expressions of relational algebra, the relation R has schema R(a,b) (A) Q1 and Q2 produce the same answer (B) The answer to Q1 is always contained in the answer Q2 (C) The answer to Q2 is always contained in the answer Q1 (D) Q1 and Q2 produce different answers Pranabesh Ghosh 1 asked Sep 19, 2016 Pranabesh Ghosh 1 534 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes Ans should be (C) ,take relation instance for this ques R(A,B) =(1,10),(2,10),(2,12),(3,4),(4,8),(4,3) and apply both query. Tariq Husain Khan answered Sep 21, 2016 Tariq Husain Khan comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes The relation has schema where the columns are 'a' and 'b'. From where did 'c' and 'd' come from ? Sushant Gokhale answered Sep 20, 2016 Sushant Gokhale comment Share Follow See all 4 Comments See all 4 4 Comments reply Pranabesh Ghosh 1 commented Sep 20, 2016 reply Follow Share do u know renaming operation? 0 votes 0 votes Sushant Gokhale commented Sep 20, 2016 reply Follow Share @Pranabesh. Sorry. Just overlooked it. But the issue is what does R.b$\neq$S.c mean? The remaming is done sequentially if anything not given. So, how can you compare 2 diff columns( if domain of 'a' and 'b' is diff) ? 0 votes 0 votes Pranabesh Ghosh 1 commented Sep 20, 2016 reply Follow Share then it shold return empty set 0 votes 0 votes Sushant Gokhale commented Sep 20, 2016 reply Follow Share I doubt if its valid to compare 2 different domains. But if what you are saying is true then (A) is the answer. COnsider relation: a b -------------------- 1 Arush 1 Megha 2 Arush Both queries give 4 tuples: 1 Arush 1 Megha 2 Arush 2 Megha 0 votes 0 votes Please log in or register to add a comment.