InfiniteAmountOfTransactionalMemory says that OO language do not have operations on sets. This might be true for some OO language, but not all, since Smalltalk has operations on sets. However, they are probably not quite what a RDBMS programmer is looking for. In Smalltalk, Set is a subclass of Collection. These sets are data structures, not mathematical objects. In other words, you can add an element to a set or remove an element from a set and it is still the same object. Collections have a standard set of operations, and you can use them on Sets. In particular, you can create a subset (using select:) or make a new set whose elements are a function of the elements of the original (using collect:). For example, suppose you have a set of Employees and you want all the ones that have a salary greater than 30,000. You should use select:, as in employees select: [:each | each salary > 30000] Suppose you wanted the set of cities that your employees live in. You could get this with collect:, as in employees collect: [:each | each address city] It is pretty easy to write a query that navigates a complex data structure or that sums up certain fields. The hard part is simulating project or join, since this will in general require creating a new kind of table, i.e. a new class. That is because each expression must return an object of some class, and if you are inventing new tables on the fly, you are essentially inventing new classes on the fly. One solution is to have a class Tuple that can be used when you don't have any existing class to use, but this is a bit of a hack. ----- Well Smalltalk still doesn't have operation on Sets as a language, but as a standard library. ''You don't understand Smalltalk then, because in Smalltalk, everything is library, there are no statements like in other languages. The language itself is implemented as methods in the standard library, ifTrue, ifFalse, polymorphic methods on True/False objects, whileTrue, whileFalse, methods on BlockContext object, etc. Smalltalk the language "is" Smalltalk the library.'' Operation on sets are useful but as you pointed out you might really want operations on relations (or sets of tuples). As such the said operations are really disguised iterators, or at least they look to me that way. Java also has operations on sets in such a fashion. Even in C you can easily abstract sets and operations on sets with function pointers, certainly more verbose than in Smalltalk, but perfectly equivalent as structure and functionality. What happens with API style operations is that you don't have a query optimizer. You might invent one for yourself, but it's not worth reinventing the wheel. Not to mention there's tons of work involved. ''I think this page is referring to at least two different concepts using the same name. Surely a "set" in a mathematical sense, can not have elements added or removed. I'm not sure what "the said operations", mentioned above, refers to. If it's #add and #remove, then I don't think they are iterators as I understand the term. I'm not sure why it's particularly hard to create a set of tuples in Smalltalk, given some reasonable model of "tuple".'' ''All in all, I think the most important message of this page is that an OO set is different from a mathematical set.'' ---- CategorySmalltalk