Google Summer of Code Proposals

Revision 2 Revision 1

Proposal 2: Multi DB support (MySQL, PostgreSQL, ODBC)

It will be possible to choose the database (mysql, mysqli, postgres)
during the Joomla! installation process.

Detailed description:
I am Edvard Ananyan, a 19 years old undergraduate student at Yerevan State
University majoring in Applied Math and Applied Physics (Department of Physics)
and highly interested in computer science. For more info about me, please visit

I offer to develop a method for using Joomla with PostgreSQL.

The project consists of the following steps:
  1. Creating a new library (in libraries\Joomla\database\database) postgres.php.
    It will be like mysql.php or mysqli.php libraries.
  2. The changes will be made in the procedure of installation, so that it
    will be possible to choose one of the available databases. A directory called
    postgres will be created in the directory installation/sql, which will be
    similar to the existing directory mysql and will contain the postgres SQL scripts.
  3. Installing Joomla based on postgres, and solving all the problems that
    will appear during the process of installation. (This is to be done before the mid-term)
  4. Testing with postgresql.
  5. Developing documentation with the detailed descriptions and specifications
    of database. The documentation is to be taken into account while creating
    new Joomla features.
I will use the following tools:
  1. PHP
  2. As much Joomla API as possible
  3. ODBC matching drivers on both Unix and Windows

With my participation in GSoC I hope to make new contacts with my colleagues around
the world, and, of course, to get valuable knowledge, skills, and experience.

Comment History
04/01/08 00:04 Samuel Alexander Moffatt
The main problem with implementing ODBC is the requirement to translate queries to individual systems, such as MSSQL or Oracle. I'd personally focus on getting one thing (postgres) to work first. Please see my other comments on your other application as well.
04/02/08 06:04 Edvard Ananyan
According to my proposal, solving postgres task is a priority and scheduled to be solved by the mid-term, so I'll be focused on that from the beginning. If the task is sold on time, by the mid-term, why not to continue with odbc? Of course, if by then some additional postgres related tasks appear, based on the results I have got, and Joomla prefer me to continue solving them instead, I will gladly consider it. Until then I prefer to keep my proposal challenging and work hard. As to translating queries to individual systems, such as MSSQL or Oracle, I will try to create something like this, but not sure.
04/07/08 00:04 Amy Stephen
It would take considerable time and performance testing for each database that is tackled. This is not simply a matter of syntax but also of indexes and other tuning requirements.

Have you considered the extent of this change to core code? Have you considered how to abstract the database layer for third party extensions? I honestly wonder if this is a "doable" GSoC project.
04/08/08 13:04 Anthony Ferrara
As Sam pointed out, the real roadblock here is the portability of SQL. It's a piece of cake to write a PostgreSQL driver for Joomla, but getting the hard coded SQL to play nice is the hard part. This is something I am very interested in, so I'd love to see a solution presented...
04/13/08 16:04 Edvard Ananyan
Thank you for your comments. I made changes to my proposal abandoning the
idea to support ODBC.

Amy Stephen wrote:

Have you considered the extent of this change to core code?

I do not have such plans. I think, Joomla developers have long thought that one day Joomla will start to support other databases, and have made some provisions in that direction. The major changes will be in the installation process, and if necessary, in some scripts. Overall, I will try to avoid touching the core as long as it is possible.

Please visit my web page for the latest version of my proposal. The problem is that my proposals are locked here, and I cannot update them here any more.

Thank you.
Buy Oil Paintings, Acrylic Paintings, order custom painted Murals, Portraits, Landscapes, Still Lifes, Flowers, Replicas and Art Prints on
Translate and make your website multilingual with GTranslate.