52 votes 52 votes Let r and s be two relations over the relation schemes R and S respectively, and let A be an attribute in R. The relational algebra expression $\sigma_{A=a}(r \bowtie s)$ is always equal to $\sigma_{A=a}(r)$ $r$ $\sigma_{A=a}(r) \bowtie s$ None of the above Databases gatecse-2001 databases relational-algebra + – Kathleen asked Sep 14, 2014 • retagged Dec 11, 2017 by krish__ Kathleen 7.4k views answer comment Share Follow See all 5 Comments See all 5 5 Comments reply Show 2 previous comments smsubham commented Mar 28, 2018 reply Follow Share A and B will be false when S is empty. 0 votes 0 votes UltraRadiantX commented Dec 30, 2020 reply Follow Share what is ‘a’ in above question? 0 votes 0 votes raja11sep commented Nov 20, 2021 reply Follow Share @UltraRadiantX ‘a’ is some value in the ‘A’ attribute. 0 votes 0 votes Please log in or register to add a comment.
Best answer 42 votes 42 votes Answer is C. C is just the better form of query, more execution friendly because requires less memory while joining. query, given in question takes more time and memory while joining. jayendra answered Dec 31, 2014 • edited Jun 22, 2018 by Milicevic3306 jayendra comment Share Follow See all 11 Comments See all 11 11 Comments reply Sachin Mittal 1 commented Dec 12, 2016 reply Follow Share thanks to early use of selection 24 votes 24 votes ankit_thawal commented Jan 1, 2018 reply Follow Share If we consider answer C means, tables will be joined using column 'A'.There may be other similar columns in two tables.Suppose column 'B' is in both. PLZ explain. 2 votes 2 votes Sumaiya23 commented Jan 2, 2018 reply Follow Share According to the equation in the question, we take a join of r and s and then select the rows where attribute A has the value a. In option C, we first apply the filter, i.e. select those rows from r where A attribute has value a and then apply join with s. Hence, C is optimised as the number of rows used in the join is less. 8 votes 8 votes talha hashim commented Oct 1, 2018 reply Follow Share @sumaiya mam very nice 0 votes 0 votes satya753 commented Nov 7, 2020 reply Follow Share Wrong explanation given 0 votes 0 votes shashankrustagi commented Jan 20, 2021 reply Follow Share This is what is known as QUery optimisation, you can also draw optimisation tree for this NPTEL question on query optimisation TAG: query optimisation 0 votes 0 votes Abhrajyoti00 commented Sep 24, 2022 reply Follow Share An Example of Theta Join:- $r \bowtie_\theta s= \sigma_\theta(r \times s) = \sigma_\theta(r)\bowtie s$ 0 votes 0 votes shikhar500 commented Dec 5, 2022 reply Follow Share @Abhrajyoti00 any referance for ur example ? 0 votes 0 votes Abhrajyoti00 commented Dec 6, 2022 reply Follow Share @shikhar500 Here you have it Chapter 14: Query Optimization (umd.edu) 0 votes 0 votes shikhar500 commented Dec 6, 2022 reply Follow Share @Abhrajyoti00 is this complete pdf is for gate relevance ? 0 votes 0 votes Abhrajyoti00 commented Dec 6, 2022 reply Follow Share @shikhar500 No, just read about the equivalence rules 1 votes 1 votes Please log in or register to add a comment.
23 votes 23 votes option c abhishekmehta4u answered Mar 28, 2018 abhishekmehta4u comment Share Follow See all 5 Comments See all 5 5 Comments reply Show 2 previous comments Abhay Agrawal commented Nov 10, 2018 reply Follow Share What if B dont have entry 20,Y? 0 votes 0 votes raja11sep commented Nov 20, 2021 reply Follow Share @srestha mam R and S are → Relation schema defines the design and structure of the relationship like it consist of the relation name, set of attributes/field names/column names. every attribute would have an associated domain. (In simple you can think of this as a relations name). r and s are relation instances. The set of tuples of a relation at a particular instance of time is called a relation instance. 0 votes 0 votes raja11sep commented Nov 20, 2021 reply Follow Share Abhay Agrawal yes, the last table last row will be → a 20 y. 0 votes 0 votes Please log in or register to add a comment.
8 votes 8 votes Answer is (C). It is an efficient way to write the query to select first the tuples then cross with other relation. satya pathak answered May 4, 2017 satya pathak comment Share Follow See all 0 reply Please log in or register to add a comment.