in Databases edited by
1,158 views
1 vote
1 vote

$\pi _{A_{1}}\left ( \pi _{A_{2}}\left ( \sigma _{C_{1}}\left ( \sigma _{C_{2}} \left ( R_{1} \right )\right ) \right ) \right )\rightarrow \pi _{A_{1}}\left ( \sigma _{C_{2}}\left ( \sigma _{C_{1}} \left ( R_{1} \right )\right ) \right )$ where $A_{1}\subset A_{2}$


How this implication holds true?? Selection operation is commutative. But is two project operation can be merge in one project operation? Can project operation removes duplicates too??

in Databases edited by
by
1.2k views

4 Comments

given A1 is a subset of A2, so the merging is holding, otherwise it wouldn't have hold.

In realtional algebra projection removes duplicates, but it is not the case for SQL.
0
0
but both can have different projection , isnot it??
0
0
A1 is the subset of A2 so A1 must have projections within the set of A2..
0
0
gate 2014 question on it
0
0

3 Answers

1 vote
1 vote
As attribute list A1 is subset of A2 the ultimate project operation result will be atrributes in A1.
0 votes
0 votes
A1 is subset of A2 so merging holds.
0 votes
0 votes

Let A1 be 

1
2
3
4
5

 

and A2 be

1
2
3
4
5
6
7
8
9
10

 

$\text{In the question it is given that A1 ⊆ A2}$

$πA1(πA2(σC1(σC2(R1))))→πA1(σC2(σC1(R1))$

$\text{It is the implication given to you, let LHS be A and RHS be B}$

$\text{This clearly means A→B which means ¬A V B}$

$\text{Which clearly says this is gonna be true in each case except for if A is true and B is false}$

So As A1 ⊆A2 this is always a true statement. Hence true

 

 

Related questions