Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Introduction

Introduction

This dictionary contains more than 600 entries dealing with issues, terms, and concepts involved in, or arising from use of, the relational model of data. Many of the entries include not only definitions but also one or more illustrative examples. I’ve done my best to make the definitions as clear, precise, and accurate as possible; they’re based on my own best understanding of the material, an understanding I’ve been honing gradually over some 35 years of involvement in this field.

I’d like to stress the point that the dictionary is, as advertised, relational. To that end, I’ve deliberately omitted terms and concepts that are only tangentially connected to relational matters (e.g., almost all details of the supporting type theory, including type inheritance details in particular). I’ve also omitted various topics that are part of database technology in general and aren’t particular to relational databases (e.g., security issues, the log, recovery and concurrency control, and so forth). What’s more, I’ve also omitted certain SQL terms and concepts that—the fact that SQL is supposed to be a relational language notwithstanding—aren’t really relational at all (outer join, UNION ALL, and updating through a cursor are examples). That said, I should add that I have deliberately included a few nonrelational terms in order to make it clear that, contrary to popular opinion, the concepts in question are indeed not relational (index is a case in point here).

I must explain too that this is a dictionary with an attitude. It’s my very firm belief that the relational model is the right and proper foundation for database technology and will remain so for as far out as anyone can see, and many of the definitions in what follows reflect this belief. As I said in my book Database in Depth: Relational Theory for Practitioners (O’Reilly):

[It’s] my opinion that the relational model is rock solid, and “right,” and will endure. A hundred years from now, I fully expect database systems still to be based on Codd’s relational model. Why? Because the foundations of that model—namely, set theory and predicate logic—are themselves rock solid in turn. Elements of predicate logic in particular go back well over 2000 years, at least as far as Aristotle (384-322 BCE).

In addition, I haven’t hesitated to mark some term or concept as deprecated if I believe there are good reasons to avoid it, even if the term or concept in question is in widespread use at the time of writing. Materialized view is a case in point here.

P3.1. The Running Example

The examples that illustrate the definitions are based for the most part on the familiar—not to say hackneyed—suppliers-and-parts database. I apologize for dragging out this old warhorse yet one more time, but I believe that using the same example in a variety of different publications can be a help, not a hindrance, to learning. Here are the relvar definitions (and if you aren’t familiar with the term relvar, then please check the corresponding dictionary entry!):

	VAR S BASE RELATION
	  { S# S#, SNAME NAME, STATUS INTEGER, CITY CHAR }
	    KEY { S# } ;

	VAR P BASE RELATION
	  { P# P#, PNAME NAME, COLOR COLOR,
	                       WEIGHT WEIGHT, CITY CHAR }
	    KEY { P# } ;
	  VAR SP BASE RELATION
	    { S# S#, P# P#, QTY QTY }
	      KEY { S#, P# } ;

The semantics are as follows:


Relvar S

Represents suppliers under contract. Each supplier has one supplier number (S#), unique to that supplier; one name (SNAME), not necessarily unique; one status value (STATUS); and one location (CITY). Attributes S#, SNAME, STATUS, and CITY are of types S#, NAME, INTEGER, and CHAR, respectively.


Relvar P

Represents kinds of parts. Each kind of part has one part number (P#), which is unique; one name (PNAME); one color (COLOR); one weight (WEIGHT); and one location where parts of that kind are stored (CITY). Attributes P#, PNAME, COLOR, WEIGHT, and CITY are of types P#, NAME, COLOR, WEIGHT, and CHAR, respectively.


Relvar SP

Represents shipments (it shows which parts are shipped, or supplied, by which suppliers). Each shipment has one supplier number (S#), one part number (P#), and one quantity (QTY); there is at most one shipment at any given time for a given supplier and given part. Attributes S#, P#, and QTY are of types S#, P#, and QTY, respectively.

Figure 1 shows a set of sample values. Examples in the body of the dictionary assume these specific values, where it makes any difference.

P3.2. Alphabetization

For alphabetization purposes, I’ve followed these rules:

  • Punctuation symbols (hyphens, underscores, etc.) are treated as blanks.

  • Uppercase precedes lowercase.

    Figure P3-1. The supplier-and-parts database—sample values

  • Numerals precede letters.

  • Blanks precede everything else.

P3.3. Technical Issues

The following list summarizes key technical issues underlying the presentation of terms, concepts, and examples in the dictionary:

  1. Keywords, variable names, and the like are set in all uppercase throughout.

  2. Coding examples are expressed (mostly) in a language called Tutorial D. I believe those examples are reasonably self-explanatory, but in any case the Tutorial D language is largely defined in the dictionary itself, in the entries for the various relational operators (union, join, restriction, etc.). If needed, a comprehensive description of the language can be found in the book Databases, Types, and the Relational Model: The Third Manifesto, Third Edition, by C. J. Date and Hugh Darwen (Addison-Wesley). Note: As the subtitle indicates, that book also introduces and explains The Third Manifesto, a precise though somewhat formal definition of the relational model and a supporting type theory (including a comprehensive model of type inheritance). In particular, it uses the name D as a generic name for any language that conforms to the principles laid down by The Third Manifesto. Any number of distinct languages could qualify as a valid D; sadly, however, SQL isn’t one of them, which is why examples in this dictionary are expressed in Tutorial D and not SQL. (Tutorial D is, of course, a valid D.)

  3. Following on from the previous point, I should make it clear that all relational definitions in this dictionary are intended to conform fully to the relational model as defined by The Third Manifesto. Consequently, you might find certain aspects of those definitions a trifle surprising—for example, the assertion in the entry for deferred checking that such checking is logically flawed. As I’ve already said, this is a dictionary with an attitude.

  4. It has become standard practice in the industry to use terms such as projection and join (and so on) in two somewhat different senses: they’re used to refer both to the operators identified by those names and also to the results obtained when those operators are invoked. I’ve followed this practice myself in this dictionary on occasion, and hope it won’t lead to confusion.

  5. It has become standard practice to interpret the terms projection and join (and so on) in another sense as well. By definition, these operators apply to relation values specifically. In particular, of course, they apply to the values that happen to be the current values of relvars. It thus clearly makes sense to talk about, for example, the projection on attribute A of relvar R, meaning the relation that results from taking the projection on that attribute A of the current value r of that relvar R. In some contexts, however (normalization, for example), it is convenient to use expressions such as “the projection on attribute A of relvar R" in a slightly different sense. To be specific, we might say, loosely but very conveniently, that some relvar (RA, say) is the projection on attribute A of relvar R—meaning, more precisely, that the value of RA at all times is the projection on A of the value of R at the time in question. In a sense, therefore, we can talk in terms of projections of relvars per se, rather than just in terms of projections of current values of relvars. Analogous remarks apply to all of the relational operations.

  6. Certain definitions (of certain operators, for example) require certain values to be of certain specific types. For simplicity, I haven’t bothered to spell out this fact in detail in every case but have simply assumed the requirement is satisfied wherever necessary.

  7. Several definitions and examples make use of a simplified notation for tuples. For example, consider the SP tuple shown in Figure 1 for supplier S1 and part P1. A formal Tutorial D representation of that tuple might look like this:

    	TUPLE { S# S#('S1'), P# P#('P1'), QTY QTY(300) }

    In the simplified notation under discussion, however, the same tuple would be represented as:

    	<S1,P1,300>

  8. The notion of set is ubiquitous in the database world. On paper, a set is usually represented by a comma-separated list (or commalist) of symbols denoting the elements, enclosed in braces as here: {a,b,c}. In what follows, therefore, I use braces to enclose commalists of items when the items in question are meant to denote the elements of some set, implying among other things that (a) the order in which the items appear within that commalist is immaterial, and (b) if an item appears more than once, it’s treated as if it appeared only once.

  9. The notion of logic is also ubiquitous in the database world. The relational model in particular is firmly based on logic. More precisely, it’s based on conventional two-valued predicate logic, 2VL (q.v.), and all references to logic in this dictionary should be taken as referring to that logic specifically, except where the context demands otherwise.

  10. Continuing from the previous point, many of the entries in this dictionary have to do with concepts from logic. Unfortunately, logic texts (and logicians) vary widely not only in the terminology they use but also, in some cases, in the substance of their definitions. The definitions I give are the ones I find most appropriate myself, but be warned that they’re sometimes at odds with others you can find in the literature.

  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint