TYPO3 Database Abstraction Layer
Project Description
Copyright 2003, 2004, 2005
Karsten Dambekalns <karsten@typo3.org>
Andreas Otto <andreas@php4win.de>
Daniel Hinderink <daniel@typo3.com>
This document is published under the Open Content License
available from http://www.opencontent.org/opl.shtml
The content of this document is related to TYPO3
- a GNU/GPL CMS/Framework available from www.typo3.com
Overview
Project name
DBAL
Abstract
The DBAL will provide a layer for TYPO3 to use different DBMS.
Extension type
The DBAL is core work and requires the collaboration of database specialists with the core team. Extension developers will have to update their extensions if they wish to integrate the DBAL into their extensions.
Status
New development. Approaching public beta phase.
Compliance
The implementation was based on a TYPO3 development version (after 3.6 had been released). Core changes are needed and have been incorporated into the code for the future 3.8.0 release.
Description
What is a Database Abstraction Layer?
A Database Abstraction Layer defines a common API to access different DBMS.
What are the objectives of a Database Abstraction Layer?
A Database Abstraction Layer provides a common API to access different DBMS. This will allow the use of TYPO3 with various other RDBMS other than MySQL and extend this basis for use through extensions.
The support is possible through the well known PHP database API ADOdb. Using ADOdb will integrate Oracle 8i, MSSQL, PostgreSQL, MAXDb, Sybase, XMLdb and many others. The layer will also support any user-defined layer you can make yourself thus offering unlimited possibilities for connectivity. Further, each layer can be selected on a per-table basis, thus offering storage of content from TYPO3 in multiple databases and multiple formats.
Who are the users?
The DBAL willl allow the integration of various databases in one system as well and thus offers a range of new possibilities for developers for integration and optimization. Developers will find a flexible API to add user defined data sources for particular purposes, or for running TYPO3 entirely based on them.
User interface
Because the DBAL will be integrated into the TYPO3 Core it will not have a user interface. It can be extended through a defined user interface.
Technical implementation:
All database operations in TYPO3 will be centralised in a class using a metalanguage, that again can be interpreted by a translation layer addressing the various RDBMS.
Since any metalanguage translation and interpretation will mean substantial load on the system, SQL will serve as the metalanguage to save this process for MySQL and honoring the most widespread setup.
The handlers for the databases that plug into the abstraction layer will need to be created and the work involved will vary drastically based on the need for field mapping and other custom emulations.
Workload calculation
For the centralisation of database access in TYPO3 and global extensions and the creation of the abstraction architecture we estimate 25 days of core work.
For individual database testing and implementation we estimate varying work loads depending on the database in question, for a set of basic handlers for PostgreSQL, MSSQL, Oracle 8i/9i, MAXDb, we estimate a total work load of 40 days of work for very experienced TYPO3 programmers with in-depth knowledge of the varying RDBMS. Developers with a proven background are very welcome to help with the respective implementations.
Funds and resource estimation
Databases to test and implement handlers are already in place, the planning phase has been finished.
Remaining is the need for funds to sponsor developers.
The core work will need 25 days @ 1100 Euros = 27500
Basic Database handlers will incurr 40 days @ 700 days = 28000
Any amount is welcome to fund development.
Production Team
Kasper Skårhøj – Core work
Karsten Dambekalns – Extension development, handlers for PostgreSQL and Oracle
Sponsors
BRAINWORXX have sponsored Kasper Skårhøj and Karsten Dambekalns to do the needed core work and the development of the basic Oracle handler.
fishfarm netsolutions have donated time to develop basic functionality and a PostgreSQL handler.
Open Bytes S.L. have sponsored cleanup and further work on the Oracle handler.
There is still a lot of work to do, cleanup, speed optimization, further feature additions to name some. While several institutions have signalled their interest in sponsoring that work, no contracts have been closed yet.
The contracts will be between the sponsor(s) and a representative of the TYPO3 community and will comprise partial production and documentation of the above mentioned functionality under the GPL.
Individual features are subject to agreements within these contracts.
Roadmap
Planning
The planning phase has been finished, core work and the first database handlers have been done.
Implementation