Re: Migrate from MySQL to PostgreSQL
| From: | Martín Marqués | Date: | Fri, 23 Jan 2004 14:54:09 +0000 |
| Subject: | Re: Migrate from MySQL to PostgreSQL | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-10334@lists.php.net to get a copy of this message | ||
Mensaje citado por Andreas Korthaus <akorthaus@web.de>:
> Hi Alexey!
>
> Alexey Borzov wrote:
> > I suggest rethinking your approach then and write a separate database
> > access layer for each database engine. This layer will contain all the
> > SQL needed to interact with the database and you will just call PHP
> > functions from everywhere else. The layer for MySQL will contain a lot
> > of ugly PHP code while the layer for a more advanced RDBMS just some
> > procedure calls.
> Hm, but If I don't have problems with performance or data integrity - WHY?
> Only to USE the Featurs?
> I use transactions, so what should be the problem?
> I don't know the exact number, but I think I have something between 150-300
> queries. And I want to support at least 5 different RDBMS.
> So this would be a tremendous work - what for?
> What should be the benefit?
Get some book on how to programm in a multi-tier environment, client, server
(server generally is divided in presentation, and Buissness) and storage.
Then you'll get why Alexey's aproach is much better, especially for future
mantainment and re-use of the code.
Think of it as a layer of abstraction between the database and the aplication
(saying the aplication has no knowledge of data storage at all, just looks at
variables that are around).
--
select 'mmarques' || '@' || 'unl.edu.ar' AS email;
-------------------------------------------------------
Martín Marqués | Programador, DBA
Centro de Telemática | Administrador
Universidad Nacional
del Litoral
-------------------------------------------------------