Civilization advances by extending the number of important operations which we can perform without thinking about them—

In this appendix, I give for purposes of reference definitions of all of the relational operators discussed in the body of the book. The definitions are given in alphabetical order by name (i.e., the name by which the operator in question is known in **Tutorial D**); they’re based on definitions in my book *The Relational Database Dictionary, Extended Edition* (Apress, 2008), but I’ve deliberately simplified them slightly here and there for present purposes. Observe in particular that the operators all return a result with a defined heading and therefore a defined relation type, which is thereby the type of any expression that represents an invocation of the operator in question. For further discussion, please refer to *SQL and Relational Theory*.

**EXTEND**: 1. (*New attribute*) Let relation*r*not have an attribute called*A*. Then the expression EXTEND*r*: {*A*:=*exp*} returns a relation with heading the heading of*r*extended with attribute*A*and body the set of all tuples*t*such that*t*is a tuple of*r*extended with a value for*A*that’s computed by evaluating*exp*on that tuple of*r*. 2. (*Existing attribute*) Let relation*r*have an attribute called*A*. Then the expression EXTEND*r*: {*A*:=*exp*} returns a relation with heading the same as that of*r*and body the set of all tuples*t*such that*t*is derived from a tuple of*r*by replacing ...

Start Free Trial

No credit card required