Creating local content for web

JQ Johnson jqj at darkwing.uoregon.edu
Thu May 24 19:29:30 EDT 2001


Richard Goerwitz writes:

>It's interesting that you bring this up.  I think the kinds of ab-
>stractions you'd normally create with stored procedures and triggers
>are normally implemented, in the Perl world (at least where possi-
>ble), via object-oriented Perl modules and scripts.

The classic reason for using stored procedures is to move some of the
business logic out of middleware code and into a shared database.  The claim
is that it makes more sense to do it there rather than have the same code
replicated in a bunch of scripts.  As Richard notes, you can of course put
the business logic code in a module and just use it from each of your perl
scripts, but what happens when, as is becoming increasingly the case, we
have web sites that are a mix of perl and PHP and cold fusion and ...?  In
such cases you need to reimplement your business logic in multiple
languages.  Say "version skew" 5 times fast.

Another reason is abstraction.  If I'm a DBA, I want to be able to redesign
the database without having to touch a bunch of application code.  Imagine a
business rule that says "send email if X happens".  That could be a trigger
within the database.  If it's not, then what do we do when a database
reorganization implies that X will now happen due to a cascading update?

Another practical issue that every database programmer should care about is
support for transactions (commit/rollback).

Perhaps the real issue here is that the kinds of SQL databases that are
currently used in library applications are comparatively simple, and often
just read-mostly.  For example, except for interfacing to our SIS, our
library doesn't maintain any really sophisticated database applications
except our Blackboard course management system (which is a turnkey system).

I suspect that as the complexity of database applications in the open source
community increases we'll see increasing pressure on MySQL and PostGRES to
implement more advanced features, which in turn will put pressure on the
abstraction layer developers to figure out ways to include such advanced
features in the layer.

JQ Johnson                      Office: 115F Knight Library
Academic Education Coordinator  mailto:jqj at darkwing.uoregon.edu
1299 University of Oregon       phone: 1-541-346-1746; -3485 fax
Eugene, OR  97403-1299          http://darkwing.uoregon.edu/~jqj/



More information about the Web4lib mailing list