Main Page

From dbwiki
Jump to: navigation, search

Dbat is a tool that facilitates the interaction with JDBC-compatible relational databases like mySQL, DB2, Oracle, SQLite, ODBC and - with appropriate JDBC drivers - even MS-Excel spreadsheets and plain text files. The tool is called on the commandline, in a makefile or an ant script. It can query tables, issue other SQL statements like CREATE, INSERT, UPDATE, DELETE, and it may export the SQL definition of a table and its contents. Dbat is the most prominent Java program in the collection at teherba.org.

SQL statements can be read from a file. The results can be presented in plain (tab separated) text, XHTML, XML, SQL, MediaWiki tables, JSON and several other formats. For common queries like count(*) or x, count(x) ... group by x there are commandline shortcuts.

The tool can be called from Java programs for a quick and simple query from a database.

The servlet bundled with this application reads and interpretes XML specifications of queries and generates a HTML form that contains the result table. There are elements for parameter input fields, and for the insert/delete/update features of a simple web-based form application. The web presentation of the result tables may be influenced in specific ways. For example, cells may be colored depending on the cell value, and links on cell values may be used to provide a comfortable web navigation through a complicated net of relational data.

The English documentation is work in progress. Some pages were already started:

There is an outdated German documentation.

The acronym Dbat can be thought of an abbreviation of Database administration tool or of Database Application Tool.