Re: Examples of SQL anomalies?
Date: Tue, 8 Jul 2008 16:28:23 -0700 (PDT)
On Jul 7, 1:21 pm, JOG <j..._at_cs.nott.ac.uk> wrote:
> On Jul 5, 1:09 pm, "David Cressey" <cresse..._at_verizon.net> wrote:
> > "Marshall" <marshall.spi..._at_gmail.com> wrote in message
> > > What can be meaningfully asked is determined by the schema.
> > > If the schema specifies that the weight attribute is nullable,
> > > then the question of how much a shipment weighs in total
> > > is a question that cannot be asked.
> > > Marshall
> > Bingo!
> However, one /can/ validly ask "please give me the minimum the
> shipment weighs" and this may still be very useful.
Well, that's assuming that all the shipments have a positive weight. What if we might ship helium baloons? Then you can't set the minimum.
OK I was just having some fun there.
> This is of course
> not a defence of null markers (obviously not. its me), but rather just
> a precaution against ruling out all questions of irregular data in
> blanket fashion. Our aim should be to provide frameworks that allows
> us to ask these questions with syntactic correctness /and/ as
> parsimoniously as possible.
My idea of the phrasing of the sum() over a nullable weight is "what is the sum of the weights of the items in the shipment for which the weight has been entered into the db?"
Marshall Received on Tue Jul 08 2008 - 18:28:23 CDT