Nested-Loop Join
Algorithm: For each r in R, examine each s in S, output tuples which match the join condition
R is the “outer” relation, S is “inner”
Cost proportional to size of R * size of S
If either R or S fit entirely in memory:
- Use smaller as the inner relation
- this is simple and not too bad: cost proportional to R + S