Relational Algebra Laws (cont)
Selection pushing ( σc(R ∪ S) and σc(R ∪ S) ):
- σc(R ∪ S) ↔ σcR ∪ σcS,
σc(R ∩ S) ↔ σcR ∩ σcS
Selection pushing with join ...
- σc (R ⋈ S) ↔ σc(R) ⋈ S
(if c refers only to attributes from R )
- σc (R ⋈ S) ↔ R ⋈ σc(S)
(if c refers only to attributes from S )
If c refers to attributes from both R and S:
- σc′∧c″ (R ⋈ S) ↔ σc′(R) ⋈ σc″(S)
- c′ contains only R attributes, c″ contains only S attributes
|