outer union

the OUTER UNION operation was developed to take the union of tuples from two relations that have some common attributes, but are not union (type) compatible.
this operation will take the UNION of tuples in two relations and that are partially compatible, meaning that only some of their attributes, say , are union compatible. the attributes that are union compatible are represented only once in the result, and those attributes that are not union compatible from either relation are also kept in the result relation . it is therefore the same as a FULL OUTER JOIN on the common attributes.
two tuples in and in are said to match if . these will be combined (unioned) into a single tuple in . tuples in either relation that have no matching tuple in the other relation are padded with NULL values. for example, an OUTER UNION can be applied to two relations whose schemas are STUDENT(Name, Ssn, Department, Advisor) and INSTRUCTOR(Name, Ssn, Department, Rank). tuples from the two relations are matched based on having the same combination of values of the shared attributes--Name, Ssn, Department. The resulting relation, STUDENT_OR_INSTRUCTOR, will have the following attributes:
STUDENT_OR_INSTRUCTOR(Name, Ssn, Department, Advisor, Rank)
all the tuples from both relations are included in the result, but tuples with the same (Name, Ssn, Department) combination will appear only once in the result. tuples appearing only in STUDENT will have a NULL for the Rank attribute, whereas tuples appearing only in INSTRUCTOR will have a NULL for the Advisor attribute. a tuple that exists in both relations, which represent a student who is also an instructor, will have values for all its attributes.
[cite:@elmasri_db_2015 chapter 8.4.5 the outer union operation]