dbtoyfs - documentation

Current version: 0.8.1, updated 31 Jan 2006

Compiling the sources

To build dbtoy just run the 'makeall.sh' script in the folder where you extracted the sources.
The script looks for the mysql and postgres client libraries and enable the corresponding drivers. If you want to choose yourself then run make defining MYSQL_DRV, POSTGRESQL_DRV or both. Ex.
[user@testlinux]$ make MYSQL_DRV=1

The output of make will be an executable called dbtoy

Mounting a filesystem

When running dbtoy, three options are mandatory: the username and the password to connect to database, and the database type (mysql or postresql). Moreover you need to specify the mount point. For instance, to connect to a local mysql database you could run:
[user@testlinux]$ dbtoy -u username -p password -d mysql /mnt/dbtoy
More options are available, running dbtoy without arguments will show a brief help.

What can I do now?

  • Walk through the filesystem.
    Each schema has its own directory, containing one subdirectory for every table. Inside the dirs there are two xml files: one with the description of the datatypes and another with the data.
  • Process the data
    Being xml files, the files can be further processed with standard tools, e.g. you can get an HTML report using an XSLT transformation (this is explained in this tutorial).
  • Read a subset of a table, "querying" a file
    Simple queries can be performed using a url-like syntax: append a question mark and your expression to the file name, using the form field=value. Ex:
    [user@testlinux]$ cat test_schema/user/data?id<10
    (Be warned: this feature is still experimental.)

Other documentation

This is the README file included in the source tarball.
A tutorial to demonstrate how the xml files can be processed through stylesheets to obtain other output formats.
TheSaguaros
Firefox 2
Powered by PHP
Goto freshmeat project page