* Re: if xml-DB possible on Reiser4 - would be also SQL?
2004-08-10 8:46 if xml-DB possible on Reiser4 - would be also SQL? Ralph
@ 2004-08-11 1:23 ` Konstantin Besch
0 siblings, 0 replies; 2+ messages in thread
From: Konstantin Besch @ 2004-08-11 1:23 UTC (permalink / raw)
To: reiserfs-list, ulenrich
I am interested in precisely the same development idea.
Looked at mysql and pgsql to share and (possibly?) map their table structure
into regular fs system. Since I like perl my examples looked as following :
simple select - "SELECT * from x_table WHERE x_field LIKE 'foo' " operation ,
written in perl would look like :
"while (x_table::xfield =~ /foo/){print;}"
assuming you have x_table mapped as /my_db/x_table file in the fs.
pgsql looks more promising , since to run complex queries you would still need
to use pgsql's query optimizer and so on.
So , the solution is either translation of filesystem calls into sql
statements (which is really inefficient ) or writing a special
client-connector for pgsqld and to use their internal (hopefully shared)
functionality to meet the goal.
Although to sql translation would be more universal , I doubt it is worth the
trouble writing. This is the reply I got from Ken , developer of SQLFairy
group (they wrote tool to translate different SQL's into each other) :
" What you want would first require a substantial amount of work to add to
our existing grammars all the rules for parsing mutation statements for each
vendor, and then you could create some sort of Perl Producer class to create
your output. It's not impossible, of course, and we'd be happy if you want
to contribute this. I will admit that I'm somewhat skeptical, however I've
been wrong about other suggestions to the project in the past. I guess I'm
generally satisfied with SQL. It's a handy domain-specific language that is
generally standardized and portable, so I can't imagine wanting to rewrite
SQL in Perl. If this is something you'd like to see in SQL::Translator,
you'll likely have to write it. :-) ".
I have downloaded Reiser4 and looking at the plugin code. PGsql has
interesting feature called "PL/Perl", maybe it is going to be enough ( for
now) to do what I need.
--Sincerely , Dean
On Tuesday 10 August 2004 4:46 am, Ralph wrote:
> Would it be possible to write a SQL-plugin for Reiser4 with all
> typicall SQL CONSTRAINTs (foreignkeys, triggers ...etc)?
>
> Thus data integrity a SQL-database despite a filesystem provides
> and a (Ms)WinFS like system could be realised.
>
> After writing some data with a SQL-client, you could retrieve
> a pieces of data through the filesystem interface, like:
> # cat ../my_databasename/my_schema/my_table/my_friend/his_email
>
> The features of "Reiser4 Atomic Filesystem" would enable
> SQL-Transactions when inserting data through a SQL-client.
^ permalink raw reply [flat|nested] 2+ messages in thread