|
(U03) |
www.btinternet.com/~adrian.larner/database/pcl03 |
|
PLATOCLAST Lecture III |
||
|
|
||
|
|
In our first lecture we considered the structure of relational data bases, and we concluded by saying that they comprised fields, each of some field-type and with some value; that these fields were (and had to be) held together in records; and that the records were held in tables. But we didn’t say what these records were supposed to mean. Our second lecture was a very different kettle of fish. We got quite deeply into formalisation, and made at least a brief acquaintance with the First Order Predicate Calculus (FOPC). In this lecture, we will be looking at that logic again, but in a very different way. And I’ll recapitulate a little, because I know some of you skipped that lecture. |
|
|
|
||
|
|
Domains |
|
|
|
Now, it wouldn’t really be fair to Dr Codd to talk about relations without at least saying how he talked (and talks) about them. Actually, well have a look at what Mr Date says (he generally says what Dr Codd said, only more so, if you catch my drift). He starts with domains. And we’ll start with something really old fashioned: field edit functions. You remember how when we have a value to put in a field, we have an edit function for the field, and we use it to check out the value: is it a good integer, or part number, or date, or whatever. Well, very roughly, anything that passes the edit function is in the domain of the field (and anything that doesn’t, ain’t). Now mathematicians, like Dr Codd, aren’t very happy with “edit functions” or predicates like “... is in the domain of”. A predicate, you’ll remember, is true or false of things: “is in the domain of” is true of 1 and any integer field, and false of 17.5 and any character string field. So, instead of talking in this way, mathematicians would say that there was something called a domain, such as the domain of integers, and every integer, and nothing else, would be in that domain. And you might want to ask two questions here. The first is: if I say “14568B is in the domain of Part Number”, am I not saying that there is something that is a domain, and Part Number has one, and 14568B is in it? And the answer is: no I’m not.[1] I and you say things like “She held her tongue for the sake of peace and quiet.” But we don’t say there is something that is a sake, and peace and quiet have one, and she held her tongue for it. “Is in the domain” of just means: is an OK. 14568B is an OK Part Number. But mathematicians like Dr Codd really do think that there are domains (and, for all I know, sakes and behalfs). And the second question you might ask (if you had understood Lecture II) is: how could the domain of integers contain only integers? Surely, you might think, it would contain pairs of integers as well. (Because if it contains 1 and it contains 2, surely it contains 1-and-2, just like a cupboard that contains a cup and contains a saucer surely contains a cup-and-saucer.) And the answer to that is: no, it does contain only integers. And the way it doesn’t contain pairs of integers is: magic. Or, to use a more technical term, Set Theory.[2] |
|
|
|
||
|
|
Relations |
|
|
|
Mr Date says a relation is well, the body of a relation instance, or an instance of a relation body, is a set of tuples (rows), and each tuple is a set of attribute-value pairs (fields to you), and all the tuples have the same collection of attributes in their attribute-value pairs, and of course (it’s a normal relation) each attribute is found once and only once in each tuple, and each attribute is related to one and only one domain, and each value paired with that attribute is in (is “drawn from”) that attribute’s domain. But somehow Mr Date manages to say it so it sounds simple, and I can’t. And he says it with a perfectly straight face, and I... well, you can judge that for yourselves. |
|
|
|
||
|
|
Predicates and Propositions |
|
|
|
But, you might ask, where did Dr Codd get all this stuff from? And it’s a long story, but you ought to understand at least its outlines. We have to go back, I’m afraid, to that logic, the FOPC. But it’s really only a rather simple way of talking that we have to consider. One of the ways we can talk is to “pick something out” by using a name for it, and then say something about it. For example, I could pick out that young man, who for the nonce I’ll call “Douglas”, and I could say of him that he is a slacker: Douglas is a slacker![3] What I’m doing here is using a predicate, “... is a slacker”. This is true of some things, true of Douglas and of each other slacker, and false of other things, such as this desk, or that young woman I’ll call her “Judy” for the sake of argument; not, I hasten to add, as I heard it recently (on the BBC!) “for the sake of an argument”. I don’t want to argue with Judy, though I might before this lecture is out. Now, you will see that this predicate, “... is a slacker”, has a hole, or place, in it. Actually, if you can see that, you’ve got better eyes than most, but it does. It’s what dear old Frege[4] used to call ungesaettigt in his quaint way: absolutely typical of him to go for a German term, and indeed of me to flaunt it before you (or “flout” it, as they probably say on the BBC nowadays). It means “unsaturated”, which is a highly exact, technical, logico-philosophical way of saying: it’s got a hole in it. And into this hole we can drop “Douglas”, no not Douglas but his name. Or, for that matter, “Judy”. Yes we can, Judy I knew this would happen; I’ve just formed a proposition, “Judy is a slacker”, but I haven’t asserted it, and indeed I don’t: because it’s false. “Douglas is a slacker”, on the other hand, is also a proposition, but a true one. A proposition is a sentence that is either true or false (but not both). “Aren’t all sentences either true or false?” did I hear someone ask? Don’t interrupt me when I’m in full flow! And please shut the window.[5] No, not all sentences are true or false. But all propositions are. Now. “... is a slacker” is a monadic predicate: it’s got one place. But “... despises ...” and “... lusts after ...” are dyadic predicates; they’ve got two places; so they are true of things taken pairwise. And, if I’m not much mistaken, “... despises ...” is true of Judy and Douglas, in that order, and false of them Douglas and Judy in that order. Whereas it’s the other way round with “... lusts after ...”, which is hard on Douglas; but slackers deserve no better. If you want, you can have triadic predicates, and in general polyadic predicates (“polyadic” for those with a classical education, n-adic for the mathematicians). And these are true or false of things taken triplewise, or in general n-tuplewise (horrid expression). Now, once upon a time in Aristotle’s day they didn’t have any truck with polyadic predicates: they just studied monadic predicates, which are a lot less troublesome. I mean, look at Douglas: he doesn’t care about being (monadically) a slacker but he’s devastated that Judy (dyadically) despises him and doesn’t (dyadically) lust after him. So, often “predicate” is used to mean “monadic predicate”. And when people like Lord Russell and dear old Frege started working with polyadic predicates, around a hundred years ago now, they gave them a different name. They said “... lusts after ...” relates Judy to Douglas how wrong can you get? Though in that Bloomsbury[6] circle it nigh on did relate everyone to everyone else. So they called these polyadic predicates “relations”. And that’s where Dr Codd got it from, but not before the mathematicians had kicked it almost out of recognition. Look, let’s take a nice simple dyadic predicate, “... is father of”. Suppose we want to say who it’s true of. Well, we could just write down:
Well it means: Abraham is father of Isaac, and Isaac is father of Jacob, and ... |
|
|
|
||
|
|
Speaking of Sets |
|
|
|
So what on earth is the point of talking, as Dr Codd does, of a relation being a set of tuples (pairs, triples, or whatever)? To answer that, I’m going to take you down a rather slippery path towards a deadly precipice, and I’m going to try to grab you by the collar just before you go a step too far, and then I’ll sit you down and tell you a horror story that will make your blood run cold. Here goes. As you may know, though I doubt it, every believing Christian is a member of the true Church. So instead of saying “Douglas is a believing Christian” we could say “ Douglas is a member of the true Church “ which I doubt, but of course I doubt both statements equally, because they are the same proposition. Things, and people, have lots of other properties. I mean, Douglas isn’t just a believing Christian (or not), he’s also a red-headed man, and we might say, just pretending you know, that he is ipso facto a member of the Club of Red Headed Men. We know there isn’t really such a club, so if anyone says, “What do you mean by ‘Douglas is a member of the Club of Red Headed Men?” we answer that we mean no more and no less than: Douglas is a red-headed man. So this is a special sort of way we could talk, a façon de parler. We speak as if, given any predicate, F, there was a club a set or class of everything that is F, the class of Fs. And then, instead of saying “x is an F” we say “x is a member of the class of Fs”. But it means just the same; it’s exactly the same proposition: we have merely translated it into another, perhaps rather silly, idiom. And, when we want to, we can translate it back. Now this sort of thing, technically it’s a transform, is quite useful. Think, for example, of how before we had pocket calculators we used to translate numbers into logarithms, manipulate the logarithms, and translate back to our numbers. We got the same answer as we would have by multiplying and dividing the numbers, but it was easier to work with the transforms, the logarithms. And any of you who are mathematicians will have done the same sort of thing with Laplace transforms. You have a differential equation that you can’t solve, so you find its Laplace transform, calculate the solution of the transform, and then try to get back to the solution of the equation (usually unsuccessfully, if my memory serves me right).And actually, that’s part of what language is about. We put what we know about the world into words, we argue with the words, and come to some conclusion in words. And then we apply that conclusion back to the world. Think about this argument:
You can play with the set notation, Greek e’s and all that, or draw Venn diagrams, and you’ll find it works out fine. But all this class-talk is just a convenience. For some people, even for me on a bad day, it makes the argument go smoother. But that’s all it does. We could check out the argument in pure logic. Indeed, using class-talk is no more significant than translating into French, arguing in French, and translating back. And what makes it just the same, Professor Quine tells us and this is where I grab hold of your collar is that the class names are always stuck firmly to the “is a member of” on their left. It may not look like that, for instance in “s is a subset of d”, but it is. For that statement is a mere shorthand for “Each thing that is a member of s is a member of d.”[9] So these “classes” are not things: there isn’t really a club of persons that ought to be welcomed in good society. Or if there is, I’m not a member of it. There certainly isn’t a club of all persons over six feet tall, or a club of all red and white feather dusters. These classes are very like sakes and behalfs: it makes sense to say that such-and-such is a member of the class of pieces of orange peel (that is, it’s a piece of orange peel), just as it makes sense to do something for someone’s sake. But it’s a complete nonsense a grammatical blunder to say that the class of pieces of orange peel has just been violently kicked, or that I’ve bumped into a lost behalf and don’t know who it belongs to. |
|
|
|
||
|
|
Speaking of Relations |
|
|
|
And what we can do for monadic predicates, we can do for relations: polyadic predicates. Instead of saying that Judy despises Douglas, I could say:
There is Judy of course, and there is Douglas, inescapably. There is even a pair of persons, Judy-and-Douglas, or Douglas-and-Judy, but those are just two titles for the same pair of persons. It would be absurd to point to a pair of persons and ask: which of them is the first of that pair? The first what of them? Of course, Douglas is taller than Judy, and Judy is prettier than Douglas, but there aren’t two different pairs of persons, a primarily tall pair and a primarily pretty pair. To say of Douglas and Judy, truly, that Douglas lusts after Judy and, falsely, that Judy lusts after Douglas, involves so to speak shuffiing their names around a relation. But it doesn’t involves shuffling them around. Sitting just where they are, Douglas lusts after Judy. They don’t have to change places for Judy to lust after Douglas. Anyway, it would take much more than that. The relation holds true of them in one direction, and false in another: but that depends on how we apply the relation, not on what we apply it to. The relation, we say, applies to them pairwise. That doesn’t mean that it applies to something which is “them pairwise”. It means that it applies pairwise, to them. And of course it applies two different ways, one truly and one falsely; but I repeat it doesn’t apply to two different pairs of persons, because it doesn’t apply to pairs of persons at all. It applies to persons. Pairwise. However, when we use this façon de parler, it sounds as if we are talking about ordered pairs, or triples, or n-tuples, of things. But we know we are not, because we can always translate back to ordinary language. And what lets us translate back, what keeps open the door we have passed through, is the superglue that sticks is a member of to the relation name that follows it. Anyway, now that we have allowed relations with n-tuples as members strictly we ought to say relations in extension”, so as not to get confused with relations as polyadic predicates we can treat ordinary classes as a special case: monadic relations in extension, relations containing 1-tuples. And now, I hope, you can see what Dr Codd was getting at. His relations are just a way of writing propositions using this strange new style of speaking: extension-speak. The extension of a predicate is the class of things of which it holds true; and the extension of a relation is the relation in extension that contains the ordered pairs of which it holds true. But remember: there aren’t really any extensions; it’s just a way of speaking, for goodness’ sake. |
|
|
|
||
|
|
Set Theory |
|
|
|
Now we’re sitting at the edge of the precipice, and I’ll tell you the tale of the first men to fall over it. The first was dear old Frege, and the second was Lord Russell, but Lord Russell noticed he’d fallen over and shouted down to Frege, Gottlob, old chap, we’ve fallen over a precipice”. Well, he would wouldn’t he? And Frege heard him just before he hit the bottom.[10] I told you mathematicians don’t like Ungesaettigtheit, and Lord Russell noticed, as surely you have, that with these relations, there’s a lot of it about. And our façon de parler doesn’t reduce it any. Because the relation names aren’t really saturated, gesaettigt. They don’t appear to have any holes names don’t but they’re superglued to “... is a member of ...”: they fill the second hole in that, but the first is left empty. Well, Lord Russell thought that we might be able to say this (we’ll concentrate on just classes, monadic relations in extension):
And that’s what he said: take an arbitrary predicate, F, and get rid of it like this, by introducing f, the class of things that are F:
For reasons that escape me, this elegant knockdown disproof of a rather tempting theory is called “Russell’s Paradox”. But, of course, it isn’t a paradox at all. The Axiom Schema of Abstraction is false. (I mean: it has a false instance the one that Lord Russell found.) The notion of “class” or “set” is self-contradictory, like that of “triangle with four sides”. But that’s not the sad part of the story; it’s the happy part. Knowledge was advanced. A promising looking path had been followed and found wanting; and a “No Through Way” notice had been erected. The sad part is this: the mathematicians refused to believe it. The Axiom Schema was obviously true, or nearly true; surely true enough. Given a little care, they would continue to work with it. So they did; so they do to this day. |
|
|
|
||
|
|
Relations Are Not Sets |
|
|
|
And that’s why Dr Codd and Mr Date talk about relations as sets of n-tuples. But do remember one thing they insist on: these relations have to be normal, that is, their records have to be normal. And that means that they don’t contain sets as values. So we never get a name, a relation name, on the left hand side of an “is a member of: they all come superglued to an “is a member of on their left. So we can always translate back from the extension talk to ordinary language, to the FOPC. So Dr Codd’s and Mr Date’s relations are not really sets, classes, or relations in extension at all: they are just a façon de parler. |
|
|
|
||
|
But Dr Codd and Mr Date are not aware of this. They think that they have followed poor old Frege and Lord Russell over the precipice, but they haven’t: they’re sitting here, safely, with us, and just shouting “Heeeeeeelp!.. I’ll help them. |
|
|
|
||
|
|
||
|
Copyright © 1993, 2001 Adrian Larner. The author asserts all moral rights. |
||