RE: [phplib] database abstraction From: Carl Youngblood (carly <email protected>)
Date: 07/01/00

I've been involved in porting one of our web applications over to Oracle
from MySQL for benchmarking purposes. We use PHPLIB's DB_Sql class for our
database calls.

Unfortunately, my news is probably not what you would like to hear. The
oracle wrapper for PHPLIB is pretty good, and you won't have too much
trouble there. The problem is that MySQL and Oracle are so fundamentally
different that:

1) You will have to do some changing of your SQL statements just to get
them to parse correctly in Oracle (for example there are differences in
CREATE TABLE statements, Oracle doesn't have "auto_increment" columns,
number data types work differently, many of the function calls are
different, dates are formatted differently etc.)

2) Though you may get your applications working in Oracle after fiddling
with the syntax, you will not have justified the expense of Oracle unless
you can take advantage of its architectural differences. For example,
instead of having your program enforce referential integrity (like you need
to do in MySQL), you should use triggers to update tables whose columns are
dependent on other tables. Also, you should be calling stored procedures
instead of manipulating the data directly. Many of the periodically-run
code that currently takes place on the web server to synchronize MySQL
tables that reside on different servers can be programmed on the database
side using Oracle PL/SQL, thus avoiding complex cron jobs and the
possibility of inconsistent data. Even more fundamental are Oracle's
scalability features. Where I work we have created an incredibly complex
fragmentation scheme programmatically, all of which we could have avoided if
we'd used Oracle, which allows you to create a single table and divide rows
across many different servers.

Don't think that I'm advocating Oracle over MySQL. I'm just saying that
there are so many differences that you really are getting into something a
lot more complex than you would first think. Taking full advantage of
Oracle will probably require a major redesign.

Best of luck,
Carl Youngblood

-----Original Message-----
From: Jeff Kolber [mailto:jeff <email protected>]
Sent: Friday, June 30, 2000 2:53 PM
To: phplib <email protected>
Subject: [phplib] database abstraction

hi all,

I am in a situation where I am developing webapp prototypes using mysql and
just I learned that this will all eventually move over to oracle, but we
don't know when the switch will be made.

I am wondering if anyone can comment on using the database abstraction of
phplib to easily allow me to continue developing using mysql and then
switch to oracle without having to rewrite all my queries. I understand that
there are more features in oracle and I'm probably going to want to rewrite
some queries anyway. I am hoping that phplibs db abstraction will help save
some time and effort in the switch. Has anyone who has done anything like
this care to comment?

thanks

(I am not subscribed so please reply to me as well as the list)

Jeff Kolber Director of Production
IN2 | 205 Hudson Street, 7th Floor, New York, NY 10013
jeff <email protected> | Phone 646-613-2007 | Fax 646-613-0648

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>