An up-to-date look at free software and its makers

Projects on the Move


In this month's Projects on the Move, we look at Squirrel SQL, a full-featured easy-to-use GUI-based database management tool. We also have updates on Debian: frozen Etch, the upcoming DebConf 7, and spring cleaning on the Debian Desktop.

By Peter Kreußel and Martin Loschwitz

Just like on a filesystem, the command line is often the quickest way to perform many database-related tasks. This said, GUI-based front-ends also have some advantages, like giving you a fast overview of existing databases and tables. Plus, if you are unfamiliar with a particular SQL dialect or engine, you can still edit tables, modify access privileges or change table structures. If you need SQL queries for more complex tasks, they often provide SQL editors with syntax highlighting.

Versatile

Squirrel SQL [1] is a Java application that relies on JDBC to support many database types. Twenty-six engines [2] - including IBM DB2, Oracle, PostgreSQL, Informix, Firebird, HSQL, MySQL, and Microsoft's SQL Server and Access - have already been tested by the program's authors. To allow Squirrel SQL to log onto a specific database engine, the user first has to set the path to the Jar file with the JDBC driver. Since the file is not typically included with the database installation package, clicking a button takes you to the driver dialog on the website, where you can download the required files. Although this doesn't always take you to the right page, the function can still be useful.

After logging onto the database, Squirrel SQL pops up an object browser (Figure 1). The browser displays a good selection of information at all object levels. At the database level, for example, Squirrel SQL lists server processes and logs. At the table level, the application shows fields and content, along with information on keys, relations, and indices.

Figure 1: Keeping on top of database structures - the Squirrel SQL object browser displays information, like the table structure and content, access privileges and indices, while at the same time providing powerful editing tools.

Customized

The database schema graphic (Figure 1) is useful for understanding the way a database is structured. However, graphical database-management tools really come into their own when you need to modify the database structure and content. Again, Squirrel SQL has a bunch of useful functions to help you do this. It can copy tables and insert them into other databases or it will generate SQL code to replicate the table schema or content, create new lines or delete a table.

When you select a table in the object browser, the content is displayed in theContent tab. Right-clicking the table view copies the selected fields to the clipboard as tab-separated tables or HTML tables. You can also generate a comma-separated list of the format (Field1, Field2) (Value1, Value2), which gives raw data suitable for SQL instructions like INSERT. It is also useful if you need to export content to CSV or Excel files. Double-clicking a field with a long texts or line breaks opens it in a separate window. To improve the readability of tables with many lines, users can apply WHERE filters to restrict the selection or use ORDER BY to sort the display.

To prevent accidental changes, table content is initially write-protected, but you can select Make editable to remove this restriction. Double-clicking a field pops up an editor with a different-colored background to distinguish it from the viewer (Figure 2); you can then manually edit the field content, import a text file or run a SQL command to change the content.

Figure 2: The SQL editor in Squirrel SQL offers similar feature richness to editors in premium IDEs. Syntax highlighting and auto-completion, along with search and replace functions, help users generate more complex queries.

Squirrel SQL can also modify the database layout. Right clicking in the object browser and selecting Refactoring takes the user to commands for modifying keys and for inserting, deleting, and modifying fields. Again, Squirrel SQL will generate SQL code, if needed, instead of applying the changes directly to the database.

Easy SQL

To make it easier for users without in-depth knowledge of SQL to handle the editing functions, Squirrel SQL provides a powerful SQL editor. Syntax highlighting and auto-completion are just two functions that make it easier to write SQL code. Just like an editor in an IDE, Squirrel SQL will add or remove comments to or from the SQL text at the press of a button. You can also select the Format SQL function to make lengthy SQL statements more readable.

If the SQL code in the editor window comprises multiple SQL statements, pressing [Ctrl]+[Cursor] takes the cursor to the start of the next or the previous statement. The editor also has a search and replace function, although it does not support regular expressions. The editor can save window content in text files or in a new database table. A bookmark function facilitates access to code segments you have already written. Squirrel SQL can also check your code for standards conformity via the Mimer Validator [3] online service.

After executing a select query, Squirrel SQL displays the results below the code window, giving you the runtime for the query or the error message from the database if the query failed. You can copy the results of the query to the clipboard as tab-formatted or HTML tables or export to CSV or Excel. A list box above the editor lets users re-use queries they have run previously.

The object browser provides a quick overview of the tables in a database and the fields in a table; however, it does not cover a major aspect of the database structure - key relations. The Table Graph function steps in to fill this gap, creating a graphical overview of table fields and their relations for selected tables, assuming the database engine supports key relations (Figure 3). A zoom function lets you view sections of larger graphics. Squirrel SQL can store graphs in XML format or as bitmap graphics.

Figure 3: A graphical overview of the relations in a database helps users to understand the structure. Squirrel SQL can store graphics as XML files or bitmaps.

In short, Squirrel SQL turns out to be a surprisingly comprehensive program with useful features and with controls that are both practice oriented and easy to use. Although this is not strictly necessary for daily work, the skin function is an attractive gadget that gives users the ability to replace the slightly jaded Java Metal theme with a more attractive alternative.

Frozen Etch

Andreas Barth recently announced good news for developers: Etch is officially "frozen". This interrupts the normal mechanisms that allow packages to flow from the unstable branch to testing. Any changes to Etch are now subject to permission by the release manager.

In the run up to the release, developers will be focusing on tidying up, among other things. In his recent announcement, Barth warned that there were still many bugs to fix in the Linux kernel before Debian could even consider a release.

Andreas Barth and Steve Langasek are worried about the number of release-critical bugs. Instead of dropping towards zero, the figures stayed put, and at a worryingly high level. This is the value that will finally decide the Etch release date. In the meantime, the Debian installer developers have a success story to tell, posting Release Candidate 3 (RC 3) on the mirrors in December 2006. RC 3 will be introduced to Etch some time in the future.

The Debian Security Team also has good news, recently announcing that there are no security-based objections to the Etch release, and thus taking at least one problem off the release manager's shoulders.

DebConf 7 Deadline Passed

The deadline for contributions to DebConf 7, which will be held this June in Edinburgh, Scotland, passed on January 31. As announced by Jörg Jaspert [4], this was also the deadline for developers to claim sponsorship from Debian funds for the trip to DebConf 7. The DebConf7 website [5] features a good selection of information on the event.

A Fresh Breeze on the Debian Desktop

Gustavo Franco took over as the maintainer of the Debian Desktop project [6] in 2006 and, like a new broom, has recently cleaned up many issues, such as the mediocre integration of various programs with the GNOME and KDE desktops. In fact, Gustavo Franco has become a kind of "ombudsman" for desktop topics and issues, acting as a catch all for suggestions from users on improving Debian on the desktop.

Figure 4: The Gnome and KDE desktop updates are ready for release.

Many Etch previews are showing signs of progress, particularly the work that has been done on the Debian desktop. After completing the installation, users no longer end up at the console, but are treated to a friendly graphical interface, which is automatically installed if you choose the corresponding packages. This takes users to a clean Gnome desktop immediately after the installation.

The number of postings on the Debian desktop mailing list is even better news than the progress with Etch. Besides this, a suggestion to set up a "Debian Screenshot" directory posted on debian-devel was also welcomed. The screenshots would give users a good idea of what programs look like and more insight into the workings of the Debian desktop. Although the Screenshot project is still at an early stage, some initial technical details have already been worked out. What's missing is the subject itself: Etch.

INFO
[1] Squirrel SQL: http://squirrel-sql.sourceforge.net
[2] Supported database engines: http://squirrel-sql.sourceforge.net/index.php?page=faq#faq0
[3] Online SQL validation: http://developer.mimer.com/validator
[4] Email by Jörg Jaspert: http://lists.debian.org/debian-devel-announce/2007/01/msg00001.html
[5] DebConf7 website: http://debconf7.debconf.org/
[6] Debian on the desktop: http://www.debian.org/devel/debian-desktop/index.en.html