> Can you elaborate on what is the nonsensical thing possible with two tables of the same type?
There's nothing intrinsically wrong with it a priori. But see below.
> To me the (A UNION B) example makes very much sense exactly in the case that you want all x s.t. (x is in A) OR (x is in B).
To me, the very idea of making a collection whose elements have different logical types is completely nonsensical. I consider it a weakness of SQL that I can form the relation:
select customer_id as id, customer_name as name
from customer
union
select employee_id as id, employee_name as name
from employee
The attributes customer_id and employee_id should have
different abstract types, so that they can't be accidentally conflated with one another, even if their internal representation is the same (say, an autoincremental int). Then, if you want to make a derived relation containing both customers and employers, you should be forced to use a sum type (à la Haskell's Either) as the primary key.
> In an OO world this would be the difference between: (snippet)
Object-orientation is simply the wrong paradigm for building data-oriented applications, at least if you care about automatically enforced data integrity and declarative data manipulation (which you should): https://news.ycombinator.com/item?id=11861520