Re: Efficiency; advanced/future SQL constructs
Date: Tue, 21 Aug 2001 17:10:48 -0400
Message-ID: <9luiip$hff$1_at_bob.news.rcn.net>
"David Cressey" <david_at_dcressey.com> wrote in message
news:UJyg7.279$Iw2.18373_at_petpeeve.ziplink.net...
> Harlan,
>
>
> > There are some operations that are so obvious and frequent that I'm
amazed
> > that they didn't show up in SQL, and that I haven't read anything about
any
> > planned updates to the standards that might incorporate them. Actually,
>
> The fact that seven fundamental statements (SELECT, INSERT, UPDATE,
DELETE,
> CREATE, ALTER, and
> DROP) cover thousands upon thousands of distinct application situations
is
> neither an accident nor an oversight.
>
> What it means is that, upon learning these seven statements, you have a
tool
> that is quite useful in a variety of circumstances where relational data
is
> to be handled.
Absolutely.
>
> If you had a different standard tool for each different situation, you
> would have thousands of tools, and, ultimately, a much longer learning
> curve. Consider the English alphabet, with 26 characters, versus the
> Chinese alphabet, with over
> 20 thousand characters. Which is easier to learn? There are, to be sure,
> some advantages to the Chinese alphabet, but ease of learning is not one
of
> them.
The plus sign is very useful, but it's also nice to have the multiplication sign, so we can write 7 x 3 instead of 3 + 3 + 3 + 3 + 3 + 3 + 3, allowing economy of expression and speeding up processing to boot.
It's handy to write "&" or some modified version of a plus sign to indicate "and", along with any other personal shorthand one may have developed over the years, when taking notes, since certain words tend to come up over and over again. Even a couple dozen special shortcuts hardly approach the complexity of Chinese. And using them doesn't preclude me from using the alphabet and the full spellings of the words as well.
In C++, there's nothing that the string library functions like strlen or strcpy do that you can't do with core C++ operations. They're still darn useful to have, though, aren't they? And, well, there *are* hundreds of functions in the standard C++ library--but that's a gift, isn't it, rather than burden? Unless you have an employer or professor who expects you to memorize them all. Hey, if you aren't aware of one that you could have used, so you wind up using basic operations instead. But if you did know about the function, it would be nice to have at your disposal.
Likewise, I'm not suggesting eliminating the basic SQL statements and replacing them with thousands of specific commands. I'm talking about supplementing what already exists with some constructs at the next level of complexity that can be written efficiently and that will take care of some of the most common tasks efficiently. Received on Tue Aug 21 2001 - 23:10:48 CEST