dbish—The DBI Shell
The DBI Shell, or dbish
, is a command-line tool that
allows you to run arbitrary SQL statements and diagnostics against
databases without needing to write a complete Perl program.
For example, let’s say we wanted to get a quick list of all the megaliths in Wiltshire. We could write a complete Perl program that connects to the database, prepares and executes the appropriate SQL statement, fetches the data back, formats it, and disconnects from the database.
With the DBI, this process is easy, but it’s a bit tedious if you just want some quick information.
This is where the dbish comes into play.
dbish allows you to connect to a data source and
type an SQL statement straight into it. dbish
handles all the underlying connecting, preparing, and executing, and
also gives you the results right away.