if xml-DB possible on Reiser4 - would be also SQL?
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.
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
Quoted 12 lines · Ralph
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_emailThe features of "Reiser4 Atomic Filesystem" would enable SQL-Transactions when inserting data through a SQL-client.