Recent PostsRecent Posts Popular TopicsPopular Topics
 Home Search Members Calendar Who's On

 The Logic, Mathematics, and Utility of NULLs Rate Topic Display Mode Topic Options
Author
 Message
 Posted Wednesday, September 08, 2010 4:33 PM
 Right there with Babe Group: General Forum Members Last Login: Friday, December 06, 2013 12:52 PM Points: 753, Visits: 3,802
 Since I've made that distinction, one aspect of logic and unknowns has become clear to me, although I'm thinking out-loud some here...Logic divides arguments into subjects and predicates. A column is usually the subject in a table, and the value for each row the predicate. So, you have a Car table, one of the columns is MPG. For a row, a number 27 in the MPG column would describe the gas mileage of that particular make and model of car for example. The value in the rows become the predicates. In logic, if one of the values is missing, we simply do not make the claim: "This car gets x MPG" is not very useful, is it? So in logic, the whole sentence is avoided, which actually makes more sense. In programming on the other hand, it is as if we assume that a value must be there. ______________________________________________________________________The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge. - Stephen Hawking
Post #982719
 Posted Friday, September 10, 2010 4:01 PM
 SSCertifiable Group: General Forum Members Last Login: Today @ 3:01 PM Points: 7,944, Visits: 8,364
 mtillman-921105 (9/8/2010)In the first post, it says that NULLs are, in effect, in logic and in algebra. But notice that we should be more careful about that since logic can only use BOOLEAN types. No-one who has seriously studied logic in the 20th or 21st century believes that - and the idea of 3-valued logic started a couple of thousand years ago with Aristotle (who asserted that there were exceptions to the principle of bi-valence despite numerous mumbo-jumbo artists claiming that he was responsible for promoting that principle). If you have NULLs in a relational system you had better not have a 2-valued logic as the logic component of your relational calculus, because the combination just doesn't work.A large number of mathematicians prefer to work using "constructive logic" which doesn't just have one or a couple more truth values than "true" and "false", but which has no models in which the cardinality of the set of truth values is as small as the cardinality of the set of all integers. "Fuzzy logic" is another logic with an infinite set of truth values. These things are used for good reasons - so don't assume that a 2-valued logic is enough. Tom'S iomadh doigh a th’ air cu a mharbhadh gun a thachdadh le ìme
Post #984176
 Posted Friday, September 10, 2010 4:28 PM
 Right there with Babe Group: General Forum Members Last Login: Friday, December 06, 2013 12:52 PM Points: 753, Visits: 3,802
 Tom.Thomson (9/10/2010)mtillman-921105 (9/8/2010)In the first post, it says that NULLs are, in effect, in logic and in algebra. But notice that we should be more careful about that since logic can only use BOOLEAN types. No-one who has seriously studied logic in the 20th or 21st century believes that - and the idea of 3-valued logic started a couple of thousand years ago with Aristotle (who asserted that there were exceptions to the principle of bi-valence despite numerous mumbo-jumbo artists claiming that he was responsible for promoting that principle). If you have NULLs in a relational system you had better not have a 2-valued logic as the logic component of your relational calculus, because the combination just doesn't work.A large number of mathematicians prefer to work using "constructive logic" which doesn't just have one or a couple more truth values than "true" and "false", but which has no models in which the cardinality of the set of truth values is as small as the cardinality of the set of all integers. "Fuzzy logic" is another logic with an infinite set of truth values. These things are used for good reasons - so don't assume that a 2-valued logic is enough.All right Tom, I like your take on this, but I'm actually not convinced. I'm kind-of playing the devil's advocate now, but here it goes:People usually reason with the law of the excluded middle intact. That is, if p is true, then NOT P is false. To give a simple example for those who are not used to talking logic, either apples are a fruit or apples are not a fruit. So a or ~a, period. Both or neither is not a possibility. Allowing NULLs creates a whole new plain - an apple is neither a fruit nor not a fruit? (This may be somewhat oversimplified, but this is the gist of it.)When NULLs are introduced, SQL logic becomes counterintuitive and creates a big, confusing mess. By the way, I read that a sort of 3VL also came up when the "Cancel" option was added in Windows - so the options were "Yes", "No", or "Cancel." So apparently DBMS are not alone in this. ______________________________________________________________________The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge. - Stephen Hawking
Post #984188
 Posted Friday, September 10, 2010 8:22 PM
 SSCertifiable Group: General Forum Members Last Login: Today @ 3:01 PM Points: 7,944, Visits: 8,364
Post #984239
 Posted Wednesday, September 15, 2010 4:02 PM
 SSCrazy Eights Group: General Forum Members Last Login: Yesterday @ 9:34 AM Points: 9,874, Visits: 9,433
 Tom.Thomson (9/10/2010)...The rest of this comment is a [n ex-] mathematical logician's take on Codd's work on having two sorts of NULL. Don't read it if you want to stick in the ...In databases with more than one type of NULL this can get quite messy: if we look at Codd's NULL-i and NULL-a, we find one version ...Heh, he. You said Null-A, ha.(*) (* - obscure A. E. Van Vogt reference...) -- RBarryYoung, (302)375-0451 blog: MovingSQL.com, Twitter: @RBarryYoungProactive Performance Solutions, Inc. "Performance is our middle name."
Post #986759
 Posted Wednesday, September 15, 2010 4:34 PM
 Right there with Babe Group: General Forum Members Last Login: Friday, December 06, 2013 12:52 PM Points: 753, Visits: 3,802
 RBarryYoung (9/15/2010)Tom.Thomson (9/10/2010)...The rest of this comment is a [n ex-] mathematical logician's take on Codd's work on having two sorts of NULL. Don't read it if you want to stick in the ...In databases with more than one type of NULL this can get quite messy: if we look at Codd's NULL-i and NULL-a, we find one version ...Heh, he. You said Null-A, ha.(*) (* - obscure A. E. Van Vogt reference...)Actually, did you know that NULL is an elegant computer language too? http://baetzler.de/humor/null.html ______________________________________________________________________The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge. - Stephen Hawking
Post #986778
 Posted Wednesday, September 15, 2010 6:13 PM
 SSCertifiable Group: General Forum Members Last Login: Today @ 3:01 PM Points: 7,944, Visits: 8,364
 RBarryYoung (9/15/2010)Heh, he. You said Null-A, ha.(*) (* - obscure A. E. Van Vogt reference...)What's obscure about it? The Pawns of Null-A was his second best book (by my counting The Weapon Shops of Isher was the best). There's a problem with the term NULL-A in that book: non-Aristotelian is a pretty ambiguous (actually not ambiguous, because there are 3 possible meanings, not 2 ) term which has been used to mean (a) disagreeing with Aristotle and accepting the principle of bivalence, (b) disagreeing with Aristotle and rejecting the principle of bivalence, and (c) agreeing with Aristotle but disagreeing with the idiots who use it to mean either (a) or (b) because they think that the principle of bivalence is the only thing that matters in logic. I guess Van Vogt's use of the term was with meaning (c), because he was a fan of Korzybski who was clearly a proponent of (c).But of course the use of "NULL-a" (or, in some papers, just "a") in relational calculi has no real connection with its use by Van Vogt. Tom'S iomadh doigh a th’ air cu a mharbhadh gun a thachdadh le ìme
Post #986814
 Posted Wednesday, September 15, 2010 6:18 PM
 SSCertifiable Group: General Forum Members Last Login: Today @ 3:01 PM Points: 7,944, Visits: 8,364
 mtillman-921105 (9/15/2010)Actually, did you know that NULL is an elegant computer language too? http://baetzler.de/humor/null.html The trouble with Andrews' presentation of the language is that he doesn't mention its principle advantage: that no programme in NULL can contain a bug. Tom'S iomadh doigh a th’ air cu a mharbhadh gun a thachdadh le ìme
Post #986818

 Permissions