Database Design Theory?

Shane Hathaway shane at
Wed Nov 9 12:02:20 MST 2005

Dave Smith wrote:
>>On Wed, 9 Nov 2005, Dave Smith wrote:
>>Can you confirm or deny this idea (that I heard many times):
>>most [if not all] of the "hairy SQL statements" in the assignments were
>>hairy only because of arbitrary constraints (e.g. not being allowed to use
>>"GROUP BY" or various other things that you'd use in "the real world" when
>>trying to find the same data).
> For the earlier assignments, we couldn't use aggregate functions like SUM
> and COUNT (I guess to give us an appreciation for them). For later
> assignments, we were free to use whatever SQL tricks we wanted, including
> aggregate functions.

Aggregate functions often force the database to perform a sequential 
scan, however.  It sounds like it was valuable to learn different ways 
to get the same results, so that you'd be able to optimize queries in 
the real world.


More information about the PLUG mailing list