Re: DBperl. Database Independent API for Perl.

From: Tim Bunce <timbo_at_ig.co.uk>
Date: Fri, 13 Aug 1993 19:44:57 +0000
Message-ID: <CBpqty.K7H_at_ig.co.uk>


DBperl API Specification. Version 0.5 DRAFT

Previous editor: Kurt Andersen <*>
Current editor: Tim Bunce <timbo_at_ig.co.uk> (Version 0.5 onwards)

Editors notes: lines of text that begin with an exclamation:
! are editors notes to the reviewers and not part of the spec.

! I have changed elements of the format and style since taking
! over from Kurt. Mainly to simplify the editing task. Generally
! there is less numbering, less indentation and more blank lines.
! Any comments/complaints etc gladly received.

This section was last modified on $Date: 1993/08/13 19:04:50 $


  1. INTRODUCTION TO DBperl

1.1 Purpose of DBperl

The purpose of the DBperl API (Application Perl-script Interface) is to create a common set of extensions (usubs) to perl to enable interaction between applications and various database engines. DBperl (yes this is the officially recognized and approved capitalization and spelling) will allow the creation of database-manipulation scripts without regard for the engine being used to service the SQL requests.

1.2 Background

A number of independent efforts have been made to connect database engines to perl. Interfaces currently exist for Oracle, Sybase, Ingres, Interbase, Informix, Rdb, Unify and perhaps others that we are not aware of. All of these interfaces have APIs that are atuned to the peculiarities of their engine back-end and thus a perl script must be changed to work with different engines.

1.3 Current Work

Since around October 1992, a group of interested parties, including the authors of some of the interfaces named above, have been working on (thrashing out) an engine-independent interface specification for what we are calling DBperl.

The specification is currently at the 0.5 revision level and is nearing completion. It's around 2000 lines and 80Kb long. The first two sections are now being distributed to comp.lang.perl and the comp.databases.* newsgroups to gather some feedback and encourage interested parties to join in the (hopefully) final review process.

1.4 Guiding Principles

It is hoped that DBperl will:

 o Provide an interface with sufficient capability to be useful.

 o Be simple to use for simple applications.

 o Have sufficient flexibility to accommodate unusual or proprietary

    functionality (events etc) and even non-sql databases.

 o Conform to or anticipate applicable standards where practical.

    Especially the X/Open & SQL Access Group SQL and CLI standards.

 o Enable the creation of database-independent perl scripts

    but not limit you to the lowest common functionality.

 o Be freely available. See below.

 o More exotic goals include: support for concurrent access to

    multiple database engines, dynamic loading of database interface     modules, easy to implement database modules in C or perl code.

1.5 Contributors To This Specification & Database Engine Of Interest

  • Kurt Andersen <*> Informix
  • Kevin Stock <*> Oracle
  • Buzz Moschetti <buzz_at_bear.com> Interbase
  • Michael Peppler <mpeppler_at_itf.ch> Sybase
  • Tim Bunce <tbunce_at_ig.co.uk> DBperl Switch & futures
  • Ted Lemon <mellon_at_hemlock.ncd.com> Ingres

... and a whole lot more people who have put up with the discussions and contributed from time to time on the mailing list (see below).

<*> Unfortunately Kevin (a major contributor) and Kurt (the original specification editor) have both recently lost their access to the net. We always need more active contributors. Please join in this effort.

1.6 Intellectual Property

Our collective intention is that all of the DBperl materials (DBperl API specifications, switch and modules) will be distributed under the same terms and mechanisms as perl itself (e.g., can be used under the GNU _or_ Artistic License).

Thus individual Module implementors and DBperl application developers are free to exploit their work commercially. They are not required to release their work or source code, but we hope that they will.

1.7 For More Information Or To Contribute Constructive Feedback

Very little of this specification has been arbitrarily chosen. If you are interested in the reasoning behind any particular portion of the API, please send your queries to the address below and you will probably get one (or more) versions of the discussions that have led up to this current formulation. Be warned that more than 9 months and over 250 messages of more than 800Kb have transpired, so the succinct version you receive will not preserve the nuances of the give-and-take that has happened.

For feedback on this specification, please send that to the DBperl mailing list from whence it will be echoed to the interested parties:

     perldb-interest_at_vix.com

If you would like to be added to (or removed from) the list of interested parties, please send your request to:

     perldb-interest-request_at_vix.com

Archives of the perldb-interest mail and copies of the DBperl API specification are kept at ftp.demon.co.uk:/pub/perl/db/dbperl by kind permission of demon.net (Demon Internet Services Limited, UK). This archive also holds other database/perl related software (oraperl, sybperl, ingperl/sqlperl, uniperl, rdb, shql etc).

Please contact one of the people listed above if you have specific questions about the handling of database engine peculiarities.

1.7 Structure Of The Specification Distribution

Because the specification is fairly long it is divided into several parts (trying to keep each part < 250 lines for maximum mailer compatibility):

  1. Introduction to DBperl (what you're reading now).
  2. Structure, Conventions and Open Issues
  3. Database Interaction Functions
  4. Error and Event Handling
  5. Data Type Conversion Functions
  6. Data Dictionary Functions
  7. The Switch and Modules
  8. Variables
  9. Standard Attributes
  10. Examples
  11. Appendix

! The order for sections 3 to 9 has yet to be decided.

Eventually this specification will become a man page for DBperl (hopefully somewhat shorter then perl's man page :-). Each Module implementor will also supply a man page for their module in a standard format and style.

End of DBperl API Section 1. Received on Fri Aug 13 1993 - 21:44:57 CEST

Original text of this message