
8 Automated Physical Database Design and Tuning
EId Name Title Salary DId MId
25 Mary Engineer 90K 100 23
40 John Writer 65K 100 5
21 Peter Accountant 70K 101 3
... ... ... ... ... ...
Table Emp
DId Description City Budget
100 R&D Seattle 10M
101 Finance New York 1M
102 Sales Seattle 1M
... ... ... ...
Table Dept
FIGURE 1.2 Tables modeling employees and departments.
data source of a SQL query is the Cartesian product of each multiset refer-
enced in the FROM clause. The predicate in the WHERE clause serves as a filter
to restrict the set of tuples in the combined data source. The SELECT clause
reshapes the tuples that satisfy the WHERE clause, by selecting