Multiple choice technology databases

To produce a meaningful result set without any cartesian products, what is the minimum number of conditions that should appear in the WHERE clause of a four-table join?

  1. 8

  2. 2

  3. 3

  4. 4

  5. 5

  6. There is no such criteria

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

To join n tables without Cartesian products, you need at least (n-1) join conditions in the WHERE clause (or using ANSI JOIN syntax). For 4 tables, this means 3 conditions linking them in a chain (e.g., T1 join T2, T2 join T3, T3 join T4). Without adequate join conditions, the database creates a Cartesian product, resulting in every possible row combination (multiplying all row counts).

AI explanation

To join N tables without producing a cartesian product, you need at least N-1 join conditions linking them together (like a spanning tree connecting every table). For a four-table join, that means a minimum of 3 join conditions in the WHERE clause; fewer than that leaves at least one table unconnected, producing an unintended cross join.