[plug] MySQL nautral language user interface
Craig Ringer
craig at postnewspapers.com.au
Mon Mar 29 09:54:09 WST 2004
On Sun, 2004-03-28 at 22:46, Garry wrote:
> >Does anyone know how I can enter natural language commands into MySQL?
> >
> >for instance:
> >
> >add user
> >create database
The 'mysql' interpreter only does SQL; sorry. I know PostgreSQL comes
with handy wrappers for common admin commands ('CREATE USER' =>
createuser, 'CREATE DATABASE' => createdb, etc) that internally
construct and send the appropriate SQL command, but I don't think MySQL
has anything like that with the core system.
Others have pointed you to various admin frontents, which might be the
best way to go. I've never liked them much personally, and always come
back to controlling the DB directly from the SQL interpreter. Then
again, I generally use PostgreSQL, which has somewhat saner user
management when it comes to basic priveleges.
Most db management frontends work over tcp/ip by default, so you'll want
to ensure that MySQL is listening on tcp/ip or reconfigure the front-end
to use a UNIX socket, as many systems set MySQL not listen on a tcp/ip
port by default.
> SQL is actually nice, especially when you get to queries..
> It's not far from natural language reeaaaallllyyyyy.. 8^)==
I love SQL, but I wouldn't call it genuinely like natural language. Like
all such langages, it tries to use english words and phrases in ways
that sort of make sense, while being extremely concice and careful about
the syntax. The whole pseudo-natural-langage thing inevitably breaks
down in complex statements.
Still, it does it much better than 4GLs like Plain English or Progress,
and vastly better than AppleTalk does. The former two generally come out
as total gibberish - to the point where I find the 'english-like' nature
of them really unhelpful and often counterproductive. AppleScript, on
the other hand, manages to be quite english-like at the expense of being
a decent programming langage. Give me 'import applescript' in Python to
get access to the AppleScript interfaces, and I'll be happy.
Even better, get all UNIX apps to support dcop where possible, and
that'd be heaven. It's /such/ a nice scripting/control interface.
Craig Ringer
More information about the plug
mailing list