Download free books at BookBooN.com
An Introduction to Relational Database Theory
230
Notes
Notes
i
SQL is just a name and no great significance attaches to that name. The standard pronunciation, by the way, is
“ess-cue-ell”, not “sequel”. Hence, a DBMS that supports it is an SQL DBMS, not a SQL DBMS.
ii
Actually, there are two very special relations which cannot sensibly be depicted in tabular form. You will
encounter these two in Chapter 4.
iii
The precise meaning of this mathematical term is given in Chapter 3, “Predicates and Propositions”.
iv
An attribute also has a type but I defer discussion of that concept to Chapter 2, “Values, Types, Variables,
Operators”.
v
The less appropriate term statement is very commonly used instead of command, especially for certain kinds of
command; I use that term sometimes in this book, as you will see. The term imperative is also occasionally used.
vi
Some texts use the term query for such a command, and some even use it to refer to any command that might be
given to the DBMS, including commands that update the database.
vii
C.J. Date (co-designer of Tutorial D) makes a slightly different suggestion for granting permissions in his
Introduction to Database Systems (8th edition), on page 506.
viii
Some textbooks use the term full instantiation, regarding substitution of some but not all of the parameters as
“partial” instantiation. Personally, I find the notion of a “partial instance” (of a kind) rather weird!
ix
Russell considered the set whose elements are precisely those sets whose elements do not include themselves
(unlike, for example, the set of all sets, which clearly is one of its own elements). Is this set, or is it not, an element
of itself?
x
There is only one 0-tuple, < >. It is denoted by the literal TUPLE { } in Tutorial D.
xi
By the present author, in a journal article published in 1988.
xii
Recall that if a value i exists such that whenever i is one of the operands of a dyadic operator the result of invoking
that operator is the other operand, then i is said to be an identity value under that operator.
xiii
That is still a little loose, however. Recall that in general we speak of the image relation of a given tuple, not a
given attribute value, in a given relation. Strictly speaking, then, for each CourseId value appearing in
EXAM_MARK we take the tuple t consisting of just that attribute value and extend t with its image relation in
EXAM_MARK.
xiv
Tables are SQL’s nearest approximation to relations.
xv
The term “state” is used by some writers but that term carries extra connotations we don’t need. For consider, if
the collection of attribute values we call a tuple is itself a value, and if a relation, containing a set of tuples, is a value,
then the relations assigned to the relvars of a relational database might as well be collectively referred to as a single
value too.
xvi
Despite the fact that certain commercially available systems that call themselves DBMSs but nevertheless do
allow such intermediate states to be visible.
xvii
Recall that r1 MINUS r2 is equivalent to r1 NOT MATCHING r2 but requires r1 and r2 to be relations of the same
type.
xviii
They don’t support the international standard’s CREATE ASSERTION statement, which would be SQL’s
counterpart of Tutorial D’s CONSTRAINT statement, and they don’t permit table expressions to appear inside
SQL’s so-called “table constraints”.
xix
SQL uses parentheses instead of braces.
xx
Obviously it can be simplified by eliminating any one of the three conjuncts.
xxi
Workarounds for SQL databases, using triggered procedures, are described in depth in reference [13].
xxii
Strictly speaking a heading is a set of <attribute name, type name> pairs, but types are largely irrelevant in this
chapter and, for convenience and following common practice, I use the term heading to refer to a set of just attribute
names when no confusion can arise.