The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Msql::RDBMS - Relational Database Management System for Msql

SYNOPSIS

   use Msql::RDBMS;

   $rdbms = new Msql::RDBMS;
   $rdbms->show;

DESCRIPTION

This is a fully catalog driven database management system for Perl 5 and mini-SQL. You should use it in conjunction with the sqldef.pl script which will generate data definition language for your tables.

GENERATING DATA DEFINITION LANGUAGE

You must pass the name of a schema definition file to sqldef.pl (an example, schema.def, is included in the examples/ subdirectory of the distribution). See sqldef.pl.

USAGE

You can call up the entire Relational Database Management System from your browser with a URL like this:

   http://bozos.on.the.bus/sample.cgi?db=demo

Where sample.cgi is a Perl script containing the three lines of code shown in SYNOPSIS.

DEBUGGING

You can get some debugging information, which consists of a CGI::dump, and an SQL statement, if relevant, by including debug=1 in the URL.

TODO

  Generate forms for interactive data definition.
  Enforce referential integrity (cascade/block deletes).
* Enforce uniqueness for label columns.
* Add fancy display options that support automagic hyperlinking of
     URLs and email addresses.

* denotes feature present in the original PHP/FI version.

AUTHOR

Brian Jepson <bjepson@conan.ids.net>

Paul Sharpe <paul@miraclefish.com>

You may distribute this under the same terms as Perl itself.

SEE ALSO

sqldef.pl

CGI::CGI, CGI::Carp, Msql

error()

The error handling method will handle errors in two ways. The first is to pass it no values whatsoever; it will check the mini-SQL connection for errors, and register any error that is found with the list of errors for this form. The second way to use this is to pass in a user-defined error, which will be registered in the list of errors, but this will not check the mini-SQL connection for errors. This is a good method to invoke after any SQL call; it returns true if there was an error, and all errors will get displayed when you invoke display_page().

errors()

This method displays all of the errors in the list of errors. Each error is displayed in a threatening red color. This is normally called by display_page(), but if you want to annoy your users, you should call it as often as possible.

printbuff()

Adds some text to the HTML buffer.