Relational querying: which of the following is a basic built-in approach to join tables to produce combined rows?

Difficulty: Easy

Correct Answer: Natural join

Explanation:


Introduction / Context:
Relational databases combine rows from tables using JOIN operations. Understanding the core join mechanisms is fundamental to writing clear SQL and modeling relationships. This item asks you to identify a standard, built-in approach to join tables.



Given Data / Assumptions:

  • A join logically matches rows across tables using equality of common attributes or other predicates.
  • We consider widely supported, built-in SQL joins rather than theoretical constructs.
  • Some options listed are not actually joins, though they are useful SQL features.


Concept / Approach:
A natural join is a standard SQL join that automatically joins tables by columns with the same names, projecting each common column once. While many practitioners prefer explicit JOIN ... ON syntax for clarity, natural joins are still a recognized built-in join approach in SQL.



Step-by-Step Solution:

Evaluate each option for whether it is a built-in join construct.Subqueries are not joins; they are nested queries.Union Join is not a widely supported SQL construct; UNION concatenates results vertically, not a join.Natural join is a bona fide join operator in SQL.


Verification / Alternative check:
Check syntax: SELECT ... FROM A NATURAL JOIN B is valid in many SQL dialects and is documented in the SQL standard.



Why Other Options Are Wrong:
Subqueries filter or compute values; they do not join tables directly.
Union Join is not a standard join; UNION stacks rows from multiple SELECTs.
All of the above cannot be correct because not all listed items are actual joins.



Common Pitfalls:
Confusing UNION with JOIN (vertical vs. horizontal combination) and assuming any multi-table query form is a “join.”



Final Answer:
Natural join

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion