Re: [Coding] A new look

From: Michael Lemler (
Date: 04/01/99

> >From what I have seen, even with plain SQL, the database connection and API
> are proprietary.

There are different flavours of SQL.  Most things strive towards ANSI Sql
92 compatability.  This, however, is a little bit of a problem with MySQL,
because it is a little bit behind.  PostgresSQL is a little bit more
ahead.  The problem with alot of those opensource system is the lack of
foreign keys.  You'd have to write your own trigger or extra over head in
the code to do what the DBMS (database management system) is supposed to
do already... I myself lean towards Postgres for it's more evident strive
towards ANSI Sql 92.

> Perl's DBI (DataBase Interface) is handy because it is a high-level
> abstraction of lower level DBD's (DataBase Drivers) and you can forget
> about such things.  That's why I really like using Perl for SQL at the
> moment.

The DBI stuff is really nice.  It takes the generic API and has at it.
It's great for web stuff and changing the database backend (hence the
"generic" API).

> I believe my code should be extensible enough that MySQL, PostgreSQL, and
> Oracle should all be able to share the same database representation (stuff
> held outside the database) but have unique database drivers.

The fully attributed model that the database uses should be pretty much
able to fit any system you want to use it on.  You should be able to
Forward/Reverse engineer it to fit any one that doesn't support foreign
keys (Postgres, MySQL, to name a few).  Oracle is a monster in itself and
I would not anticipate the average Mud Adminstrator would be able to
administer an oracle server.. although for those that do.. distributed
databases and multiple muds running on different servers might be a neat
idea ;)  Then you could possibly get them to interchange information so
you could balance server load from one system to the other when a player
leaves various zones.. I suggest this only because I am not the one coding
it. Heh heh.

> If someone is aware of a non-Perl DBI, I'd like to know about it because
> that would basically eliminate the need to write database-specific drivers.

Look into ODBC (Open DataBase Connectivity).  Just get rid of all the nice
perl DBI stuff and convert everything to the unbelievably open standard of
ODBC (you can get drivers and support for nearly any platform you can run
on a system constructed since the early 80s..)

I hope this is of help.


     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  |

This archive was generated by hypermail 2b30 : 12/15/00 PST