Main screen of dbMan Authentization dialog (for remote connection) Table manager List of tables Editable grid At work Command line interface
|
This is main screen of dbMan. On the title we can see database driver and database name (PostgreSQL, database infoline) and information about using dbman-proxy. On the bottom frame of window is input SQL line with history buffer and button "Do" for executing SQL commands. Rest of area is SQL output window with scrollbars where we can see output of any SQL commands executed by Do button and results of some internal commands. Below caption is main menu where we can found many of internal commands and configuration checkbuttons in "readable form". Database menu allow work with database (open, remote open through DBD or nDBD proxy, close), work with transactions (begin, commit, rollback, auto-commit - end), import SQL commands (normal and quick way) and of course exit item. Table menu allow using Table manager (hiearchical view to database and tables), List of tables (with browse and editable browse), Browse in grid for any select or describe SQL command and Count rows function for numbering output lines. Plugins menu can contain items from plugins (in distribution are Oracle and PgSQL extend functions plugin but you can program own plugins). In menu Configuration we can found functions for saving and editing configuration file and for freezing authentization. Window menu allow find text in SQL output window (regular expressions of course), manipulating with SQL output window - some setup functions, font selection for native language sets), work with SQL input line - single and multi line setup,work with history buffer - clean, save to disk and history window and send contents of output buffer to file. In Help menu we can found in-line commands index, SQL commands index and SQL commands help and of course version information for dbMan.
In authentizating dialog you can specify hostname and port of remote SQL server (in standard open connection some database drivers (e.g. PostgreSQL) can connect remote SQL server itself, but for e.g. Oracle you must use DBD or nDBD proxy. DBD proxy has first two entries to set machine and his port. Next you must specify database driver - you can choose from ADO, Adabas D, Altera, CSV, IBM DB2, ExampleP, FreeTDS (MS SQL Server), Fulcrum, Illustra, Informix, Informix Release 4, Ingres, Net and pNet, NullP, ODBC, SolidSQL, Oracle, PostgreSQL, QBase, Sybase ADE, XBase (FoxPro files), Sponge, Minerva mSQL or MySQL drivers. And you can (of course) wrote own driver - nDBD drivers are only envelope to classic Perl DBI/DBD drivers. Next you can say which database you want to connect to (e.g. in PostgreSQL database name, in Oracle schema name etc.) and user name (login) and password. Password is of course showed as collection of stars. If you hate Perl DBI/DBD proxying (as I because this proxying is very unstable) you can use dbMan own nDBD proxying through dbman-proxy. You need server with running dbman-proxy - e.g. on port 2401 and nDBI/nDBD interfaces on this server - of course Perl DBI interface to database to which you want to connect. You specify this hostname and port into last two entries and set on checkbox above them. I use nDBD proxying also in local connection because nDBD proxying can debugging connection and you will see what data will going raw through the net :-) If your connection is O.K. you will see connection title on the top caption of dbMan main window. Unless you see error message from nDBI, DBI or operating system (e.g. if dbman-proxy connection fail, you see system Connection refused message).
Table manager is one way to show structure of your database. You can see name and type of database and all tables in this database. If you have Oracle (or any database with schemas xxx.yyy you see at the top of hiearchy schemas and as its branch tables and views in this schemas. All tables are expandable and after expand you will see structure of table - items (columns), its type (standard SQL92 type and compatible types in some databases such as PostgreSQL) and scale (only some databases, e.g. Oracle). In future I want implement into Table manager some functions such as create, modify and designer of table and of course all functions from List of tables.
List of tables is another way to show structure of your database. You will see all tables in one big list, but you can select in this list through search entry line (on screenshots I want select all tables called 'c_kat' at the beginning. You can browse selected table (or tables - cartesian multiplication), edit table in editable grid, describe table (this is implemented only for PostgreSQL, Oracle and MySQL, but you can work on any other nDBD driver for this function). You can also export data from table into SQL commands - into file or to stdout. In new versions list of tables supports refresh, filter (regular expressions of course) and unselect button - more efficient for users.
Editable grid is (as I think) the best thing in the dbMan (of course dbman-proxy is more better for me but only expert can use dbman-proxy because I havn't write any line of documentation for dbman-proxy). This grid works only with PosgreSQL and Oracle (and I hope in MySQL, but MySQL is very bad database system for interactive application). I need one column in table as referencing column. In "good" database system exists rowid field (called rowid, oid etc.) which can ideally represented one row of table. But in other system (MySQL) I must found primary or unique key and use them - not safe thing I know but what can I do with stupid database systems... You can edit existing fields by clicking into it. You can also add new rows by clicking to the first empty line below table. But if you have primary key across two and more columns you can't insert values into all of these columns - I know this is bug and I correct it soon. You can delete column too - select row and use button. Refresh button can reload table from database system and you will see changes. Find button you can use to search in table. Editable grid can be used as browse grid - from List of tables, from menu or from SQL input line through internal prefixes in SQL (\b) - browse can't edit but you can browse any select or describe command - e.g. select from five tables with some joins between them, with ordering and where clausule, with group by and having etc. I think more useful thing than standard SQL output of select command. In browse you can change ordering through clicking on title of columns.
On the next screenshots you can see dbMan "at work". Yellow background of SQL output of select commands means that this commands is part of current transaction. If you say 'commit', yellow disappear, if you say 'rollback', text disappear. Left margin of SQL command is optional numbering of rows, on second 'select' you can see function 'Summary info' - at the end of output is shown count of rows and fields in each row. At the bottom of screenshots you can see find dialog with typical regular expression. Now you can click to Find button and both '10|Ben' and '20|Ber' will be selected...
dbMan is not only for X users. If you have terminal (e.g. console, xterm, rxvt, ssh or telnet session etc.), you can use one of three command line interfaces for dbMan. Simpliest (but only full function) is '-l' interface which is shown at the snapshot. I plan implement curses and slang interfaces '-c' and '-s'. But current version is good and nobody want anything new (if I lie please mail me :-) ). dbMan is fully localized into English and Czech languages, but you can write support for his own language. dbManLang interface is designed for simply adding languages into dbMan. So you see at snapshot Czech implementation of background process dbman-proxy in the middle of outputs of dbMan (string "Pripojeni n aproxy..."). But dbman-proxy also can operate in English language and dbMan in Czech etc.
|