Well, I've always found the porting issue between various databases to be trivial when compared to the "logic" issues. the same exact set of sql executed in the same exact sequence on the same exact data will produce two entirely different results when executed in different databases.
How will you code your application so that
- it is independent of the fact that Oracle gives you non-blocking queries, whereas the others will not. The application that works fine in Oracle may/may not work find in the others.
- Oracle gives you consistent reads, others will not. See
</code>
http://asktom.oracle.com/pls/asktom/f?p=100:11:::::P11_QUESTION_ID:431163879856 <code>
for a somewhat amusing story with regards to that.
Basically, you may well get different answers to the same queries run in the SAME exact set of circumstances on different database engines.
- it is independent of the locking model employed by the database? Concurrency control is the major differentiator between databases.
And the list goes on. Stored procedures will not only POSSIBLY provide a performance boost (you can write bad code in any language), but since you will need to implement them for each database -- they will give you the opportunity to exploit the underlying database fully. They will give you the opportunity to solve some of the above issues (the logic you need will be different in different databases for different things).
Unless you are building a READ ONLY application, your best bet would be stored procedures
for portability of the rest of the appication. There will be subtle differences, with different solutions, for each RDBMS you use. You will be able to exploit the underlying RDBMS to its fullest by using stored procedures as there will be no hesitation to implement a function
as it should be given the target RDBMS. Not as it has to be in order to be generic.
Just my 2cents worth. I've been there, done that. The right way to do things varies by database. Sybase -- they need you to use temp tables, Oracle -- we don't like you to (not necessary). DB2 -- if you want a consistent result set, you must use repeatable read isolationn, Oracle not so. And so on.