logo       
Google Custom Search
    AddThis Social Bookmark Button

Database abstraction: msg#00005

Subject: Database abstraction
MySQL makes me twitch so i'll be getting phplist to work with PostgreSQL.
While doing this i'll keep it generalized for any rdbms.

I've already downloaded a CVS snapshot and imported that into a private
SVN repository to track my changes.  I'll be glad to push the diffs back
to wherever.

I started adapting phplist.sql.  I stripped MySQL dump comments, separated
drop table and insert statements, and generalized it for multiple databases.
I changed all the KEY (some_column) to CREATE INDEXes.  Also changed some
data around.  For example date 0000-00-00 doesn't make sense in PostgreSQL,
so i changed it to 0000-1-1, though the date of install usually makes more
sense for last modified columns.

So i got it loaded into PostgreSQL.

Is it really the case that MySQL doesn't have sequence generators?  This
page doesn't say.
http://en.wikipedia.org/wiki/Comparison_of_relational_database_management_systems

Finally i started tracing the code through the adodb module.  SHOW TABLES
isn't gonna work there.  MySQL has the information_schema, right?

Too bad it doesn't have schemas.  I plan to use schemas with PostgreSQL
and hopefully won't break anything with MySQL.

Oh yeah, i didn't see a file that grants the proper permissions, so i'll
create one.  The web app will connect as a user that doesn't own the 
tables, so i'll grant permissions as needed, one at a time.

-- 
Brian DeRocher
http://brian.derocher.org/



Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>