Обсуждение: Re: SQL generator

Поиск
Список
Период
Сортировка

Re: SQL generator

От
Chris Browne
Дата:
"Bit Byter" <takashi_949@hotmail.com> writes:
> I would like to know what the underlying SQL statement will look
> like, so that I can use this knowlege to build a generic parser that
> creates SQL statements from the "English like" text, using the
> syntax I described above.

I seem to recall that Lotus tried doing this once upon a time with
trying to build an "english-like" interface for doing "business
intelligence-like" queries against spreadsheets.

Nobody likely remembers HAL; it was underwhelmingly useful.

In effect, anyone that was skilful enough at composing "English-like"
queries to get HAL to work was likely to find the "native" methods
more convenient.
-- 
let name="cbbrowne" and tld="acm.org" in String.concat "@" [name;tld];;
http://cbbrowne.com/info/linuxxian.html
"La Cicciolina [...]  Electing her was an interesting  contrast to the
situation in the UK: In Italy they elect a representative from the sex
industry.  In the UK, they elect their clients." -- Peter Gutmann


Re: SQL generator

От
"Aaron Bono"
Дата:
On 7/25/06, Chris Browne <cbbrowne@acm.org> wrote:
"Bit Byter" <takashi_949@hotmail.com> writes:
> I would like to know what the underlying SQL statement will look
> like, so that I can use this knowlege to build a generic parser that
> creates SQL statements from the "English like" text, using the
> syntax I described above.

I seem to recall that Lotus tried doing this once upon a time with
trying to build an "english-like" interface for doing "business
intelligence-like" queries against spreadsheets.

Nobody likely remembers HAL; it was underwhelmingly useful.

In effect, anyone that was skilful enough at composing "English-like"
queries to get HAL to work was likely to find the "native" methods
more convenient.

 
There was a company near where I live who recently tried to do natural language parsing for search engines - like Ask Jeeves.  It was an utter failure but before they got far enough to see that, they did a study of users to see how they search.  They found that people adapted to learn how to "talk in the search engine's language" fairly easily and it has actually become unnatural for people to talk to search engines with a natural language.

I have had so many problems with users who know a little SQL causing database crashes and slow downs.  I don't think I would recommend allowing someone who can't even do SQL access to a database.

If you still think it is a good idea to do this, good luck and I hope you prove us wrong.  But just keep in mind you are going to be attempting something that has been tried before with little success.  Maybe you will figure out what your predecessors were missing...

Bottom line though, just how difficult is SQL to read and write anyway?  It is a hell of a lot easier to read and write than any other computer language I have seen.

==================================================================
   Aaron Bono
   Aranya Software Technologies, Inc.
   http://www.aranya.com
==================================================================

Re: SQL generator

От
Andrew Sullivan
Дата:
On Wed, Jul 26, 2006 at 10:21:01AM -0500, Aaron Bono wrote:
> Bottom line though, just how difficult is SQL to read and write anyway?  It
> is a hell of a lot easier to read and write than any other computer language
> I have seen.

It's not SQL.  It's the notion of relations.  If the language were
QUEL or ENGLISH (a PICK variant) or whatever you have, but relations
underneath, the same problem would be happening.

Remember, even people who ought to understand this stuff, like
developers who program against databases for a living, frequently get
it wrong.  I'm not surprised that casual users can accidentally do a
5-way Cartesian product.  But it would make no difference if the
commands were specified in natural language, because the conceptual
confusion is the problem.

A

-- 
Andrew Sullivan  | ajs@crankycanuck.ca
A certain description of men are for getting out of debt, yet are
against all taxes for raising money to pay it off.    --Alexander Hamilton