[Typo3-dev] DBAL

Karsten Dambekalns k.dambekalns at fishfarm.de
Mon Aug 2 11:50:57 CEST 2004


Hi Robert,

On 2004-08-01, Robert Fink <robert.fink at gmx.net> wrote:
> It says: Allthough still in development, a database abstraction layer will 
> likely be added to PHP5.1 .
>
> Does this make TYPO3's own DBAL useless?

No. Most DBAL layers I have seen so far (about all that are useful in
the PHP world...) do too little for our needs. We do not need DBAL as
most people see it, but rather something like 'SQL abstraction plus DB
access uniformity'.

Most abstract only the use of the database on a function level,
i.e. they allow you to use the same method for executing a SQL
statement no matter what DB you use. This would be the 'DB access
uniformity'.


The point were it starts to be interesting is when you want to set up
tables, change tables, ... All the nifty stuff the install tool
resp. extension manager does. This is possible only with a few
libraries (Metabase, ADOdb, MDB2), and all have their caveats.

It even goes further. We use BLOB fields in TYPO3, those need to be
handled differently. So we need to check for the field type, and then
decide how to update the field.

And since we must stay compatible to older setups and MySQL is and
will stay the 'base DB system' for TYPO3, we need to do all the table
setup actions based on MySQL dumps. This means parsing them,
constructing SQL suited to the DB you are using, ... Plus you need to
be able to look up what field type a field would have in MySQL,
instead of what it actually has in your DB.


So, no I think nothing will ever make the current work useless, aside
from all DB system vendors agreeing on *one* *complete* SQL standard
(proividng abstraction to the SQL coder), providing the excat same
behaviour accross systems, if this is combined with a thing like dbx
(which provides the abstraction to the PHP programmer).

If the upcoming abstraction does fit our needs, it would be possible
to switch the current use of ADOdb against it. But this needs testing,
would have to provide substantial improvements and is far too early to
be discussed now.


Does this explain a little?

Karsten




More information about the TYPO3-dev mailing list