dbTalk Databases Forums  

Why is "group by" obligatory in SQL?

comp.databases.theory comp.databases.theory


Discuss Why is "group by" obligatory in SQL? in the comp.databases.theory forum.



Reply
 
Thread Tools Display Modes
  #31  
Old   
Walter Mitty
 
Posts: n/a

Default Re: Why is "group by" obligatory in SQL? - 07-24-2009 , 10:43 PM






"Bob Badour" <bbadour (AT) pei (DOT) sympatico.ca> wrote

Quote:
paul c wrote:

Bob Badour wrote:
...

Your response leaves me wondering whether you know what irony I meant
and wondering what irony you mean.

I'd say the basic one is that most language designers pretend to depict
reality, most users then look on the result as reality.

The irony I meant was Dijkstra coined the term "structured programming".
You praised Dijkstra and then criticized structured programming. I realize
the market corrupted and perverted the term, but I enjoyed the irony.

The market also corrupted and perverted the term "separation of concerns",
which Dijkstra called an austere mental discipline.
You might be able to come up with a shorter list, namely the lists of truly
meaningful terms
that have NOT been corrupted and perverted by would be followers..

"If you can bear to hear the truth you've spoken,
Twisted by knaves to make a trap for fools,
Or see the works you gave your life to, broken,
And stoop and build 'em up with worn out tools,"
--Kipling--

Reply With Quote
  #32  
Old   
toby
 
Posts: n/a

Default Re: Why is "group by" obligatory in SQL? - 07-27-2009 , 05:04 PM






On Jul 23, 5:46*am, Hans Mayr <mayr1... (AT) gmx (DOT) de> wrote:
Quote:
Hello,

I still don't know if there is a better group to post general
questions about SQL and the background. So I hope nobody minds ;-)

My question is: Why do you have to state the GROUP BY explicitly in
SQL? Why isn't it enough to write "select a_field, sum(b_field) from
c_table;"?
This is a valid aggregate: over all rows.

Quote:
What additional value is generated by "group by a_field"?
That is a different case, obviously.

Quote:
Thanks and best,

Hans

Reply With Quote
  #33  
Old   
Cimode
 
Posts: n/a

Default Re: Why is "group by" obligatory in SQL? - 07-29-2009 , 08:14 AM



I reread your last email and realized you raised some critical points
we never had a chance to exchange upon throughout past conversations.

Quote:
*It reminds me of another fuzzy area, what I would call 'domain
theory' to use Codd's lingo. *
With an initial education and inclination towards mathematics, I
discovered Codd's relation construct fact encoding scheme with the
strong bias to understand the mathematical refining process that would
have naturally led him to conclude that such construct would be
practical/optimized to formalize facts based of a universe of
discourse specific observation/implementation .

I was initially genuinely more interested in the mathematical refining
process than the construct itself since I considered the relational
model more of an application of abstraction than a truly abstract
reasonning. Naturally, I started looking for *Codd's math* in
previous work of his, particularly on the subject of celullar automata
(1968) written prior to the publishing of the relational model 1969
and 1971 papers. I had a hope to get a clearer understanding of the
mathematical universe of discourse that may have driven him to the
assumption that a relation construct could represent a effective
solution to information encoding.

While studying Codd's cellular automata work, involving the
establisment of deterministic predictability through algebra,
probabilism and set theory (you have not misread) , I quickly realized
that an effective encoding scheme to represent pairs of logical values
was at the heart some fundamental issues in the relational model. My
big deception however was that there was no clear definite link
between the two papers, that could explain the *why* on the choice of
relations as a formal optimized construct. I felt very frustrated
since I could find an explanation on the choice of relations (why not
another construct?).

Having that said, I started looking of relational model as a related
but independent work of Codd's but I kept in mind which math were used
priorly and which problems Codd had to solve. As far as domains are
concerned, it is true they somehow remained *off the radar* in
relational theory development and algebric scrutiny. It is reasonable
to assume that they were an initial etymological tool Codd used to
designate sets of values in a non naive way to distinguish them from
define the computing construct of relation in the context of
constraint specialization. Once the relational construct was defined,
a probably more computing significant construct, the relation, was
clarified and placed the interest more its possible applications
rather than the theory behind the construct.

Such phenomenon can be observed in all great discoveries: the capacity
to generate a new field of investigation driven by application but
somehow amnesic asto the process that brought the discovery .


Quote:
He didn't talk of 'types', at least in the
early days. *There must be a elemental domain theory that emphasizes
See my above comment.


Quote:
dependent the rest of Codd's concept was on a distinct domain
implementation, eg., equality in his RM can't be implemented without
forrmal domains. *I like the word 'domain' because it helps me separate
that basic requirement from all of the more subtle and logically
unnecessary concepts that are written about by type theorists. *
The understanding of domains is fundamental to the understanding of
constraints specialization.

Quote:
The
theorists such as Date are basically *concerned with programming
productivity, which is fair, but I'd say it is distinct from basic RT
implementation.
The scope of RM's field of investigation is simply breathtaking and my
guess is there will be a need for tens of people like Date to clarify
signficant portions of it. In such perspective, I agree that a domain
theory is more than ever necessary. I have now spent 1 decade trying
to clarify some aspects of it with a significantly better grasp of
some of Codd's motivation and writings.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.