Home > Articles > Open Source > Perl

Web Database Interaction Using Perl

Chris Radcliff
  • PrintPrint
  • Share ThisShare This
  • DiscussDiscuss
Chris Radcliff shows you how to create an HTML interface to any database that implements the Structured Query Language (SQL). The examples use Perl, the Common Gateway Interface (CGI) module, and the DBI module to create a generic interface that discovers and interacts with standard databases through the Web.

Web Database Interaction Using Perl

To get an idea of the simplicity that Perl Common Gateway Interface (CGI) offers a new programmer, an example of Perl connecting to a database is included in the following article.

Universal SQL Query Processor

Accessing a database might seem to be a straightforward process, and the advent of standards such as SQL might reinforce that notion. However, good tools to access databases are still few and far between, so most database users still browse databases through custom programs. Worse yet, many database users are forced to plod through a schema, one query at a time, by using a command-line interface and the formatting nightmare it presents.

The Web, however, provides an excellent venue for exploring and manipulating data. The flexibility of HTML formatting enables data to be presented attractively, regardless of whether the style is specific to the current schema or general to all SQL-accessible data.

Before designing a specific format for Web presentation of database content, you should browse the data in a universal format to get a sense of what is available. The most flexible way to do this is by offering a generic SQL portal to any database accessible by the Perl CGI engine.

  • Share ThisShare This
  • Your Account

Discussions

Make a New Comment

You must log in in order to post a comment.

Related Resources

Danny KalevMinutes from the October 2009 Meeting
By Danny Kalev on Yesterday No Comments

The minutes from the Santa Cruz (October 2009) meeting are available here. Even if you're not a language layer at heart, I encourage you to read them.

Danny KalevA Reader's Opinion on Attributes
By Danny Kalev on October 20, 2009 No Comments

In August I dedicated a series to the debate about C++0x attributes. I believe that it covered the subject in a balanced and detailed way, but I keep getting complaints from C++ users who don't like attributes for various reasons. Here's a recent email I received from a Polish C++ programmer. While it  doesn't represent my opinion about attributes -- I'm rather neutral about this feature and consider it a "solution waiting for a problem" -- but it suggests that attributes are still a highly controversial issue that will haunt C++ for a long time. The email is quoted here with minor edits that and as usual, with all private details removed.

Danny KalevFollowup: The Web 2.0 Guy I Ain't
By Danny Kalev on October 16, 2009 1 Comment

Almost a year ago, I posted here The Web 2.0 Guy I Ain't. People wonder whether I still resist all those Web 2.0 features and technologies at the end of 2009.

See All Related Blogs

There are currently no related titles. Please check back later.

Informit Network