Difficulty: Easy
Correct Answer: Cartesian join
Explanation:
Introduction / Context:Joins combine rows from tables. When you list multiple tables in the FROM clause without a join condition, the database produces a Cartesian product. Recognizing this is essential to avoid explosive row counts and unintended results.
Given Data / Assumptions:
Concept / Approach:A Cartesian join multiplies each row of one table by every row of the other. If CUSTOMER_T has m rows and ORDER_T has n rows, the result has m * n rows. Without a join predicate, the DBMS cannot match rows semantically, so it returns all combinations.
Step-by-Step Solution:
Identify the absence of a join predicate (no ON/USING and no WHERE filter).Conclude that the operation is a Cartesian product.Select the option that names a Cartesian join.Verification / Alternative check:Add a WHERE clause (e.g., CUSTOMER_T.CUSTOMER_ID = ORDER_T.CUSTOMER_ID) and compare row counts; the Cartesian product with no predicate will be much larger.
Why Other Options Are Wrong:Equi-join/Natural join require equality conditions. Outer join returns unmatched rows padded with NULLs, which still requires a join condition.
Common Pitfalls:Accidentally omitting join conditions in older implicit join syntax (comma-separated tables), leading to huge, slow queries.
Final Answer:Cartesian join
Discussion & Comments