Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: does a table always need a PK?

Re: does a table always need a PK?

From: Mikito Harakiri <mikharakiri_at_ywho.com>
Date: Wed, 3 Sep 2003 09:09:02 -0700
Message-ID: <Vuo5b.11$eu1.202@news.oracle.com>

"Lee Fesperman" <firstsql_at_ix.netcom.com> wrote in message news:3F559DC5.7E91_at_ix.netcom.com...
> Mikito Harakiri wrote:
> > AVG = SUM(val)/SUM(1) is redundant
>
> That's ugly. And, it is incorrect. I see no problem with shorthands like
AVG(). Ugly or not, that's a mathematical definition of what AVG is. Make it AVG = SUM(val)/COUNT(1), if you want to correct it for nulls. If the definition doesn't work for extreme cases like zero rows, it also means that it should be redefined to suit those, as they routinly do in math. Received on Wed Sep 03 2003 - 11:09:02 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US