The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

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, found in the utility/ subdirectory of the installation; this script 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). Example usage:

   sqldef.pl schema.def

The above example will send the data definition language to STDOUT. To send it to mini-SQL (this will wipe out all of the data in the specified database):

   sqldef.pl schema.def | msql database-name

The schema.def file contains a little bit of documentation on how the data is organized within the file, and how you can set up your own tables.

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).
* Add support for many-to-many relationships.
* 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>

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

SEE ALSO

CGI::CGI, CGI::Carp, Msql, File::Counterfile