Which of the following are to be considered while applying JOIN operations on two or more relations?
A. If two tables are to be joined on equality condition on the common attribute, then one may use JOIN with ON clause or NATURAL JOIN in FROM clause.
B. If three tables are to be joined on equality condition, then two JOIN or NATURAL JOIN are required.
C. N-1 joins are needed to combine N tables on equality condition.
D. With JOIN clause, we may use any relational operators to combine tuples of two tables.
Which of the following are to be considered while applying JOIN operations on two or more relations?
A. If two tables are to be joined on equality condition on the common attribute, then one may use JOIN with ON clause or NATURAL JOIN in FROM clause.
B. If three tables are to be joined on equality condition, then two JOIN or NATURAL JOIN are required.
C. N-1 joins are needed to combine N tables on equality condition.
D. With JOIN clause, we may use any relational operators to combine tuples of two tables.
Solution
All four statements are valid points for joining relations in SQL.
A: An equality join on a common attribute can be written with JOIN ... ON or with NATURAL JOIN in the FROM clause.
B: Joining three tables needs two join operations, whether JOIN or NATURAL JOIN.
C: B generalises to N tables, which need N-1 joins on equality conditions.
D: The ON condition of a JOIN is not limited to equality. Any relational operator (, , , , ) can be used, which gives a theta join.
Options 1, 2 and 4: each leaves out one true statement, so none is complete.
Memory trick: the equality-only case is the equi join (NATURAL JOIN is a special case of it), while a general condition with any relational operator is a theta join.
Related questions:
2025: 27 May Shift 2
2025: 15 May Shift 2
2026: 11 May Shift 2
2026: 23 May Shift 2