The Select * from ritual is my brave daily action and it soulf the same for you, this speech is commun, till you got to deposit it on each customer house, one with Oracle, the other meets M$ SqlServer, and cool peapole feel it Postgresql, that's cool, NO it's unfair what happens to developpers to get in ? It's Ok that both ODBC and JDBC makes a cool abstraction, but for DBAs ? the miserable DB admins get furious when the same project is to be implemented with and other DBMS, while he have spend days and nights screwed to he's keyboard writing tons of rules, triggers and functions, he's boss pushed by the client to tell that poor man that the hell is far to be out of sight; let's play again ! Oh ... The question is : "How can we get an databse architecture that is really able to feet the motion with no bad reaction ?" the answer is no that simple, but let's examine possible issues :
Standards
For the first layer of any databse it's allright, the SQL92 standard gives a really uniform langage that 99% of usual DBMS understand, for the second layer, the problem get out for it's rip and play it zombie : While Oracle uses Pl/SQL, MSSQL have it's T-SQL.
Cross Platform Languages
It's the best solution, DMBS like Postgresql accepts C, Python, Ruby, PHP as internal language, and the same -or perhaps- do the others, the most commun is C, so writing functions in C will be painfull certainly but you'll get the universal key for the DB diseases.
XML is evrywhere
This is the most universal solution, it depends if your DMBS have XML parsering capabilities, Postgresql do, Oracle and MSSQL too. working with XML, will ensure the compatibility of your code allover the DBMS.
Code Converters
Such solutions exists, for example from Oracle to PostgreSql, from Msql to Oracle and so on, some are free/Open and the most are commercial, but this is the last resort for a DBA who does not care hwo the things goes or whom the time is so short that he can't get the morning's holy coffe, but its' a real pleasure to do it, I have done that from Oracle to Postgresql easily, I think that it's possible to do it, but this last solution does not meet the transparency told above ;)
The inside databse is the most blessing part of a DBA life, going from a structure to an other is race that nevr gets over, anyway think to get some abstration while building DBs, one day you'll need friend.
You can ping this entry by using http://phpmagazine.net/cgi-bin/pub/mt-tb.cgi/3998 .