If there are two tables 'A' and 'B', then ______operation contains all the tuples from both 'A' and 'B' (containing duplicates only once).
If there are two tables 'A' and 'B', then ______operation contains all the tuples from both 'A' and 'B' (containing duplicates only once).
Solution
Union combines two tables (relations) into one result that has every tuple present in A, in B, or in both. A tuple appearing in both tables is listed only once, so duplicates are removed.
Project, Select and Rename: these are unary operations that work on a single table. Project picks columns, Select picks rows that satisfy a condition, and Rename changes the name of a table or attribute. None of them combines two tables.
Union needs both tables to be union-compatible, meaning the same number of attributes with matching domains. In SQL, UNION removes duplicates, while UNION ALL keeps them.
Related questions:
2025: 14 May Shift 1
2025: 3 June Shift 2
2026: 11 May Shift 2
