Open In App

Aptitude | GATE CS 1998 | Question 54

Like Article
Like
Save
Share
Report

Which of the following query transformations (i.e., replacing the l.h.s. expression by the r.h.s. expression) is incorrect? R1 and R2 are relations. C1, C2 are selection conditions and A1, A2 are attributes of R1.

a.  σC1( σC2R1)) → σC2(σC1(R1))

b.  σC1( πA1R1)) → πA1(σC1(R1))

c.  σC1( R1 ∪ R2 ) → σC1(R1) ∪ σC1(R2)

d.  πA1(σC1(R1)) → σC1 (πA1 (R1))
(A) a
(B) b
(C) c
(D) d


Answer: (D)

Explanation: D is the answer. If the selection condition c1 is on attribute A2, then we can not replace LHS expression by RHS expression. In RHS first projection is on A1 then selection condition c1 will fail because no A2 will be present there.


Quiz of this Question


Last Updated : 24 Oct, 2018
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads