Re: Method for accessing SQL databases



On Wed, 2005-01-26 at 17:00 +0100, Magnus Bergman wrote:
> I'm about to write a Gnome-VFS module for accessing SQL databases
> (primary MySQL and Oracle). And I was wondering if there is some kind of
> standard related to mapping a URL to an SQL query. And if I'm forced to
> hack something myself I would appreciate opinions from others.

> I imagine it could look something like this:
> scheme://[[user[:password] ]host[:port]]/[database]?query
> 
> Or perhaps instead of query:
> [table[,table...][:field[,field...][:primary_key=value]]]

One way to handle the query part would be to start by using views so
that the standard table browsing filesystem would work on 'queries of
sorts'.

The method I used [1] to expose relational databases relies on the
ability to present Extended Attributes (EA). Using EA you can fairly
cleanly expose a relation as a directory by mapping for each tuple the
fields to EAs.

Being a virtual filesystem I chose to pass in SQL queries using a
virtual file. For SQL I'm happy to not just type it in directly as text
in the URL.

[1] http://witme.sourceforge.net/libferris.web/

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]