On 28 Aug 2009, at 9:56pm, Beau Wilkinson wrote:

>> I want a query language that non-techies can use easily, but also
>> supports arbitrarily complex queries. Does such a language exist?
>
> I remember reading once, in an old book about RDBMS, that SQL was  
> intended to be something that non-technical decision-maker types  
> could learn in a few hours. Apparently some early proponents of SQL  
> had a naive vision of Robert McNamara-types writing queries like  
> "SELECT NAME FROM PRODUCT ORDER BY GROSS_MARGIN" and then basing  
> decisions on the result. All that was necessary (they thought) was a  
> little abstraction (i.e. SQL) to hide the accidental difficulties of  
> "computer language."
>
> Oh, to be so young and stupid again...

In the 1980s there was a rash of Database Query Languages which  
claimed to be English-like.  In fact I remember two particular  
languages which actually called themselves 'English'.  Think of a very  
early very simple version of SQL, with a few changes so the parser  
could ignore words like 'the' and 'to'.  They could be great to demo,  
because the person running the demo would be a language-lawyer with an  
excellent knowledge of what the parser could and couldn't handle.  But  
as soon as you sat a non-techie in front of them it became obvious  
just how flexible English is.

The ones I remember were query languages only: they had the equivalent  
of 'SELECT' but no 'INSERT' or 'UPDATE'.  They also had commands which  
rendered various types of graph: not all output was in the form of  
text.  The lack of ability to change meant that they could be harmless  
to the database files since they could be run perfectly well with read- 
only access.  I suspect that most of them were front-ends to already- 
existing spreadsheet or DBMS systems.  And there's nothing to stop  
someone writing such a front-end themselves: take a sentence in a  
natural language and convert it to a SQL command.

To get back to the original question, I don't know of anything  
superior to SQL in this aspect.  Anything sufficiently flexible will  
suffer from injection opportunities.  Anything that isn't forces the  
user to learn a formal language.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to