SQL Set Operators. Set? Really?http://sqlblog.com/blogs/dejan_sarka/archive/2014/01/10/sql-set-operators-set-really.aspxUNION, INTERSECT and EXCEPT operators are commonly called Set Operators. For example, in Books Online you can find a topic “ Set Operators ”, where  these three operators are explained. They should represent set operations UNION, INTERSECT and MINUSenCommunityServer 2.1 SP2 (Build: 61129.1)re: SQL Set Operators. Set? Really?http://sqlblog.com/blogs/dejan_sarka/archive/2014/01/10/sql-set-operators-set-really.aspx#52420Fri, 10 Jan 2014 17:08:45 GMT21093a07-8b3d-42db-8cbf-3350fcbf5496:52420Marc Shapiro<p>A few nits:</p>
<p>First, the defining characteristic of a relation is that the values in certain columns are related to the values in other columns. In a relation with attributes not in the key (i.e., a function), those attributes are a function of the key columns. You write "entities are related, i.e. that are of the same kind", which is implying that the relation is between rows. But each row belongs to the relation because its columns are related in that particular way.</p>
<p>Second, your final diagram for Union (and similar for Intersect and Minus) has grey columns on the sides which don't match between the left and right tables (or attributes not matching between the left and right relations if you prefer). I believe the distinguishing characteristic of the set operations is precisely that the columns in both the left and right inputs must be the same, and that the result has the same columns. Diagrammatically, your rectangles should be aligned. This, of course, makes them look like a squared off version of the Venn diagrams.</p>
<p>Third, a table where all of the columns are in a unique key (a relation where all attributes are in the key) is, mathematically, a relation which is not a function. These are very interesting and important in general. A special case of these has only one attribute (or column); and these are just as interesting even if you dismiss them. For example, all finite sets of integers can be represented as such relations: the set of positive even numbers less than 100, the set of positive odd numbers less than 100, the set of primes less than 100, the set of all positive integers less than 100, and so on. There are plenty of interesting operations that one can do with such things. And they are definitely relations.</p>re: SQL Set Operators. Set? Really?http://sqlblog.com/blogs/dejan_sarka/archive/2014/01/10/sql-set-operators-set-really.aspx#52437Sat, 11 Jan 2014 11:32:39 GMT21093a07-8b3d-42db-8cbf-3350fcbf5496:52437Dejan Sarka<p>Marc, </p>
<p>Thank you very much for your valuable comments! For the first and the third one, I see I was sloppy, and I understand completely that I should not be sloppy in a post where I complain about something being imprecise. I corrected the post in such a way that the corrections are clear.</p>
<p>About your second comment. Yes, the columns in both the left and right inputs must be the same, as you say. But this is exactly my point as well. This is not a condition for set operators. Therefore, I think it is better to call the SQL operators "relational operators" thank "set operators with limitations". And from Venn (or Set) diagrams you don't see these limitations. With the diagrams I draw, I think it is more clearly shown that this operators work only on attributes that are shared between both input relations.</p>
<p>Thank you again for your comment!</p>