For the relational algebra expression R union S to be valid, what must be true of R and S?
Correct answer A. They must have the same number of attributes with compatible domains
Union, intersection and set difference need union-compatible operands: the same arity (number of attributes), with the i-th attribute of each relation drawn from compatible domains. The number of tuples can differ freely. Sharing a common attribute name is what natural join relies on, not union. SQL's UNION has the same rule: both queries must return the same number of columns with compatible types.
Answer checked How we write and check questions
Discussion