26 votes 26 votes Give a relational algebra expression using only the minimum number of operators from $(∪, −)$ which is equivalent to $R$ $∩$ $S.$ Databases gate1994 databases relational-algebra normal descriptive + – Kathleen asked Oct 5, 2014 • recategorized Apr 25, 2021 by Lakshman Bhaiya Kathleen 7.0k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 57 votes 57 votes $R-(R-S)$ There is no need to use Union operator here. Just because they say you can use operators from $(∪, −)$ we don't need to use both of them. Also they are saying that only the minimum number of operators from (∪, −) which is equivalent to $R ∩ S$. My expression is Minimal. Akash Kanase answered Nov 29, 2015 • edited Jun 8, 2018 by Milicevic3306 Akash Kanase comment Share Follow See all 9 Comments See all 9 9 Comments reply Show 6 previous comments Thadymademe commented Oct 21, 2022 reply Follow Share Yes @Deepak Poonia Sir I have edited my comment. 0 votes 0 votes Deepak Poonia commented Oct 21, 2022 reply Follow Share @Abhrajyoti00 $R \cap S = S – ( R – (R \cup S) ) $ is Incorrect. $S = S – ( R – (R \cup S) ) .$ 1 votes 1 votes Abhrajyoti00 commented Oct 22, 2022 i edited by Abhrajyoti00 Oct 22, 2022 reply Follow Share Oh yes! Thanks sir. Corrected now 0 votes 0 votes Please log in or register to add a comment.
15 votes 15 votes Answer: R − ((R ∪ S) − S) Just imagine the Venn diagram in mind. Rajarshi Sarkar answered Apr 28, 2015 Rajarshi Sarkar comment Share Follow See all 4 Comments See all 4 4 Comments reply Anu commented Jun 26, 2015 reply Follow Share Can you please say Is it necessary to use both U,-? Can I represent R ∩ S=R-(U-S) ? where U is the universal set. 0 votes 0 votes Rajarshi Sarkar commented Jun 26, 2015 reply Follow Share You should answer what the question demands. So you have to use only (∪, −) operators with R and S. 2 votes 2 votes Akash Kanase commented Nov 29, 2015 reply Follow Share Question says only the minimum number of operators from (∪, −) which is equivalent to R ∩ S. Using union is unnecessary here ! 8 votes 8 votes prithatiti commented Jan 27, 2020 reply Follow Share @Rajarshi Sarkar Thanks for this solution 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes p ={(1,1) , (2,2) , (1,2)} q={(1,2) , (2,10) ,(3,2)} p ח q = { (1,2) } p-q={ (1,1) (2,2) } p-(p-q) = { (1,2) } so p-(p-q) = p ח q = { (1,2) } air1ankit answered Aug 8, 2018 air1ankit comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes An other approach ((R ∪ S-(R-S))-(S-R)) svas7246 answered Jun 19, 2022 svas7246 comment Share Follow See all 0 reply Please log in or register to add a comment.