With respect to the operations in relational algebra (not in SQL):
I'm having trouble understanding why 2 relations have to be union-compatible before the union operation can be applied on them. I came across this question in Ramez Elmasri's Fundamentals of Database Systems.
What is union compatibility? Why do the UNION, INTERSECTION, and DIFFERENCE operations require that the relations on which they are applied be union compatible?
I can understand why this is the case for INTERSECTION & DIFFERENCE but I don't see why this constraint also applies for the UNION operation. Why can't we just union both relations together (something like a full outer join)? What's stopping anyone from doing that?
From what I've gathered in my Google searches, the answer goes something like because UNION, INTERSECTION & DIFFERENCE are set operations which are binary, and so for the result to be a relation, it is bound to have tuples of same number of attributes and the domain should be same too. (Here and here)
What I'm understanding from the answers from my searches is that the result has to have the tuples with same number of attributes and domains. My question then is wouldn't the result of full outer join not be a relation? (According to what's stated above).