Databases Reference
In-Depth Information
As an example, let us assume that we have three tables in the database: an employee
table (emp) with 10,000 rows, a project table with 250 rows, and an assignedTo table
with 50,000 rows. Two of these tables, project and assignedTo, are involved in the query
below (see Figure 4.2). The common join column is projectName. We omit the time
required to display the results of the join since it is constant for all the strategies and
depends heavily on the display medium.
Figure 4.2
Two table join configuration.
Example Query 4.1
SELECT p.projectName, p.projectLeader, a.empId
FROM project AS p, assignedTo AS a
WHERE p.projectName = a.projectName;
m = 250 rows in the project table (each row is 200 bytes).
n = 50,000 rows in the assignedTo table (each row is 100 bytes).
Search WWH ::




Custom Search