How to Create a Postgres and MySql Driver!!!!

The software that I write is not intended for just one customer who is locked into a single RDBMS. Instead it can be used by virtually any customer using the RDBMS of their choice. How is this possible? I deliberately designed and built my infrastructure around the 3 Tier Architecture which breaks down application code into three distinct areas of responsibility:

It is only the Data Access layer which communicates with the database, therefore it should be possible to communicate with another database simply by changing the component which exists within this layer. I have already produced two versions of my Data Access Object for MySQL:One for versions up to 4.0 which uses the original mysql_* functions.

Another for version 4.1 and above which uses the 'improved' mysqli_* functions.The purpose of this article is to document my experiences while producing a DAO for a totally different RDBMS, in this case for PostgreSQL (version 8.0.3).

No comments:

Welcome to CodingWeb

CodingWeb is a rich source of finding tutorials, code, sessions, podcasts and above all demos of all the tutorials shared by the community. It is a rich collection of PHP, Mysql, HTML & CSS tutorials. I hope you find it useful.