Re: Examples of SQL anomalies?

From: -CELKO- <>
Date: Tue, 1 Jul 2008 09:20:20 -0700 (PDT)
Message-ID: <>

>> You're mixing up nonexistence with emptiness. The empty set exists. We can count how many members it has. That count [cardinality] is zero. <<

Not quite the same thing ..

>> We can add up all the numbers in it and get a total; that total is zero. <<

But there are no members to add! You created zero from nothing as a convention to get rid of the term in the sequence. In the older summation notation, there also is a convention that when the initial value of the index is greater than the final value, the summation is zero. Pardon my pseudo-code, but how do you defend the traditional approach which says:

  SUM (i) FOR i FROM 7 TO 9 = 24
  SUM (i) FOR i FROM 9 TO 7 = 0

A set-oriented version might be:

 SUM (i) FOR i IN {7,8,9}  = 24
 SUM (i) FOR i IN {9,7,8}  = 24
 SUM (i) FOR i IN {8,9,7}  = 24
 SUM (i) FOR i IN {9,8,7}  = 24


I can support this convention with associativity, commutativity and induction. Received on Tue Jul 01 2008 - 18:20:20 CEST

Original text of this message