-
Notifications
You must be signed in to change notification settings - Fork 0
Home
DBToy is a fuse-based filesystem for Linux, that lets you browse the contents of a relational database through a set of directories and xml files.
You will see a directory for every schema in your db, each containing a directory for every table. In the “table” dirs there are a couple of files with the table’s definition and data.
The xml files can be processed through stylesheets to obtain other output formats.
DBToy is licensed under the GPL, and comes with no warranty.
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=1The output of make will be an executable called dbtoy.
When running dbtoy, two options are mandatory: the username 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 -d mysql /mnt/dbtoyMore 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. -
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<10See the User Manual
DBToy is Copyright © 2003 – 2010 Domenico Rotiroti.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. A copy of the GNU General Public License is included in the source distribution of this software.