CIS4365: Database Applications
Fall, 2017


UTEP Oracle 9i
UTEP Oracle 10g Notes

Cartesian Product

Understanding the concept:

The Cartesian product, like its counterpart in traditional set theory, the Cartesian product of two recordsets combines every record in one set with every record in the other. The Cartesian product (or just "product") of two recordsets is returned by a SELECT statement with no JOIN clause.

¡@

The statement below will return every customer combined with every customer service representative:

SELECT CustomerName, CSRName FROM Customer, CSRs;

Cartesian products are occasionally useful either for analysis purposes or as interim results for further manipulation. Most often, though, they're produced by accident. Forget to drag the join line in the Access query designer and bingo, you've got a Cartesian product. It's amazingly easy to do, so don't be embarrassed the first (dozen) times it happens to you.