Re: portability Oracle <=> MySQL
Another idea would consist in the separation of source code and SQL queries.
For example, SQL queries would be stocked in a configuration file and would contain entire list of queries of the application. And each query would be associated with multiple SGBD syntaxes.
Ex :
[sqlmode]
mode=mysql
[oracle]
q1=SELECT C_1 || C_2 FROM T_1
q2=INSERT ....
q3=SELECT ...
q4=UPDATE ...
[mysql]
q1=SELECT CONCAT(C_1,C_2) FROM T_1
q2=INSERT ....
q3=SELECT ...
q4=UPDATE ...
In the application, you have to read this configuration file to obtain the good SQL syntax.
+ : simple to deploy
+ : application portable on all DB
+ : can change DB of an application without redeploying it(text configuration file)
+ : application faster thanks to specific SQL syntax(no ANSI)
- : applicative code (configuration SQL) not reusable; but it's not very hard to adapt if you have the table of correspondences Oracle/MySQL and you don't use complex syntaxes :)
- : there's a litle (big) problem when you have to generate dynamic queries...
Solution ?
Good idea ?
Others?
Subject
Views
Written By
Posted
6105
February 28, 2006 04:38AM
2775
February 28, 2006 06:55PM
2428
March 21, 2006 02:48AM
4153
March 21, 2006 03:31PM
2421
March 22, 2006 10:12AM
2706
March 23, 2006 07:19AM
2441
March 23, 2006 08:09AM
Re: portability Oracle <=> MySQL
4247
March 24, 2006 04:55AM
2503
March 24, 2006 06:01AM
2533
March 02, 2006 12:33PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.