List:General Discussion« Previous MessageNext Message »
From:Michael T. Babcock Date:October 11 2002 2:08pm
Subject:Re: MySQl db as filesystem.
View as plain text  
Joel Rees wrote:

>Should we guess that he wants to be able to log into a database with csh,
>run ls and get a list of tables, run cat on a table and get a
>tab-delimited listing of the contents of the table?
>
>On the surface it didn't seem like such an unreasonable question, ...
>
The easiest way would probably be to write an sh-like 'shell' that 
executed commands it didn't recognize via a 'real' shell, but filtered 
the rest.  It would take 'ls' and use it to show a list of databases, cd 
'databasename' as 'use databasename', then 'ls' would show tables and 
'cd tablename' would push "FROM tablename" onto the stack in some form.

The only problem I see is the reading of data in any complex way ... SQL 
queries can do things that no 'ls' command could ever do without using 
`ls -l --query="select name, address from cust left join custorders on 
cust.id = custorders.custid left join orders on custorders.orderid = 
orders.id left join orderstatus on orders.statusid = orderstatus.id 
where orderstatus.name in ('invoiced', 'shipped')"`

-- 
Michael T. Babcock
C.T.O., FibreSpeed Ltd.
http://www.fibrespeed.net/~mbabcock


Thread
MySQl db as filesystem.Alex Polite10 Oct
  • Re: MySQl db as filesystem.Paul DuBois11 Oct
    • Re: MySQl db as filesystem.Joel Rees11 Oct
      • Re: MySQl db as filesystem.Paul DuBois11 Oct
      • Re: MySQl db as filesystem.Jayce^11 Oct
    • RE: MySQl db as filesystem.Ed Carp11 Oct
      • RE: MySQl db as filesystem.Tech)11 Oct
        • RE: MySQl db as filesystem.Ed Carp11 Oct
          • RE: MySQl db as filesystem.Tech)11 Oct
    • Re: MySQl db as filesystem.Alex Polite11 Oct
  • Re: MySQl db as filesystem.Harald Fuchs11 Oct
  • Re: MySQl db as filesystem.Michael T. Babcock11 Oct
  • Re: MySQl db as filesystem.Christian Jaeger11 Oct
  • Re: MySQl db as filesystem.Joshua J . Kugler12 Oct
  • Re: MySQl db as filesystem.Anthony W. Marino12 Oct
  • Lost connection to MySQL server during queryYanglong Zhu12 Oct
  • Lost connection to MySQL server during queryYanglong Zhu12 Oct
  • Re: Lost connection to MySQL server during queryGerald R. Jensen12 Oct
  • Re: Lost connection to MySQL server during queryYanglong Zhu12 Oct
  • Re: Lost connection to MySQL server during queryGerald R. Jensen13 Oct
  • Re: Lost connection to MySQL server during queryYanglong Zhu13 Oct
Re: MySQl db as filesystem.Paul DuBois11 Oct
Re: MySQl db as filesystem.Jan Steinman12 Oct
  • Re: MySQl db as filesystem.David Garamond12 Oct
  • Re: MySQl db as filesystem.Anthony W. Marino12 Oct
  • Re: MySQl db as filesystem.Michael T. Babcock16 Oct