
∏
PropNo, BranchNo, Street, City, PostCode
(σ
Type = ‘FLAT’∧ PROPFORRENT.BranchNo = BRANCH.BranchNo
(PROPFORRENT w v BRANCH))
The horizontal fragments of PROPFORRENT relation are listed below.
PROPFORRENT
1
= σ
BranchNo = ‘B003’ ∧ Type = ‘HOUSE’
(PROPFORRENT)
PROPFORRENT
2
= σ
BranchNo = ‘B003’ ∧ Type = ‘FLAT’
(PROPFORRENT)
PROPFORRENT
3
= σ
BranchNo ≠ ‘B003’
(PROPFORRENT)
Similarly, the horizontal fragments of BRANCH relation are as follows.
BRANCH
1
= σ
BranchNo = ‘B003’
(BRANCH)
BRANCH
2
= σ
BranchNo ≠ ‘B003’
(BRANCH)
The canonical tree for the above query is
The optimized query tree for the above query is as follows.
Appendix 295
Π
PropNo, BranchNo, Street, ...