|
Using SQuirreLRussell Bateman last update: 13 April 2010 |
This article explains how to set up and use SQuirreL, an SQL viewer and editor. SQuirreL is a solution for any platform since it's written in Java. It is also an excellent browser since it supports nearly every RDBMS in existence, in particular, MySQL, which I use here as my illustration. The advantage of using SQuirreL over the native software that ships with each database is that the interface—and therefore your work habits—can remain the same. This isn't important if you ONLY work with one database. I have worked with 4 or 5 over the last few years and 3 simultaneously when I wrote this how-to.
russ@taliesin: ~/Downloads> java -jar squirrel-sql-3.1-install.jar
russ@taliesin:~/dev> java -jar squirrel-sql.jar
C:\Documents and Settings\russ\My Documents\Downloads> java -jar squirrel-sql-3.1-install.jar
Change the Start in: path if you like. I set mine to the root of my development area (C:\Users\russ\dev).
There is an "acorn" icon under subfolder icons to use if you like.
My experience is that this is necessary on Windows 7. I haven't set up SQuirrel on previous versions of Windows since I principally use Linux anyway.
This set up is for MySQL as an illustration.
Windows -> View Aliases. How did I know this? Because when I wrote my first sample SQL application years ago and learned how to use MySQL's JDBC connector in Java code, this was the class I used. (If I stumble upon more cogent advice for this step, I promise to come back and add it.)
Windows -> View Aliases and double-click the
alias you've already set up (to use MySQL). You should now see the
database particulars (assuming you have a database already set up and
working), for example,
The base assumption is that you already know how to peruse a database to look at its tables, rows and cells. If this is not the case, you might instead use MySQL's browser and follow the information at MySQL: The Database Browser. Or learn using other databases and database tutorials.
In this case, I just wanted a glimpse inside my database to see its tables as I built them from my application code. Comparing the previous illustration and this one here, you'll see how this is done.