Java Tutorial - Java Script : Squirrel

Java Tutorial - Java Script :

Squirrel


Squirrel is similar in many respects to MySQL Control Center. It provides a program with graphical interface and the ability to connect to a database. It can be used to browse the structure of the database and execute queries against it. Tables can be created and altered within Squirrel by entering SQL commands in a provided command window. Unlike MySQL Control Center, Squirrel is written solely in Java and uses JDBC for its database connections, which allows it to work with any database supported by JDBC. The following table provides a summary for Squirrel.

Installing Squirrel is easy. First, download the binary distribution and decompress it. Inside is Squirrel’s self-installing .jar file. To install it, just enter:

java -jar squirrel-sql-version-install.jar

You will be presented with an installation wizard similar to the one used to install most Windows applications. However, this wizard is written in Java and runs on the current Java platform. You will need to have the appropriate privileges to install the program into your desired target directory.

When running, Squirrel looks like the screen shown in Figure 8.7
.
Squirrel also supports a number of plug-ins. One of these is MySQL-specific and seems to provide the MySQL-specific syntax for creating tables. The biggest advantage that Squirrel brings, however, is that it supports both
MySQL and HSqlDb, and any other database with a JDBC driver.