Re: Please Help - Java, Database oracle or sybase
- From: Joe Weinstein <joeNOSPAM@xxxxxxx>
- Date: Thu, 09 Feb 2006 08:16:03 -0800
jill wrote:
Hi All,
I am a java programmer used to using oracle database.
In my new job, we have oracle plus sybase database. Some applications
use oracle and some use Sybase. I am writing framework, so it can be
used by all applications.
Is it possible to write connection code, independent of database
driver, by just using java.sql package.
One problem I am seeing in sql package is java.sql.types does not have
cursor. I don't know how sybase returns a resultset but java.sql.other
does not look very promising.
Could any body suggest a general solution using two different database.
Thanks a lot,
Jill.
Hi. Unfortunately the world is not simple enough for that.
For a given application you can confine the DBMS-related code
to a given area, but different DBMSes offer significant amounts
of their functionality in a vendor-specific way, so in order to
effectively use a DBMS, you have to have significant vendor-specific
code. As you have seen, a cursor return from a stored procedure
output parameter is a non-standard Oracle thing. Sybase and Oracle
stored procedures are important, and different. Furthermore,
Sybase and Oracle locking behavior are different, so a transaction
may behave significantly differently in one DBMS than another.
I understand the impulse to want to treat DBMSes as interchangeable
black-box file data stores, but it is a doomed approach as soon
as performance or transactions are required. If a non-trivial
application works *well* with one DBMS, it is because it benefits
from DBMS-specific functionality, and trying to switch it to use
another type of DBMS may take *architectural* changes, not just
DBMS-access switching.
Good luck,
Joe Weinstein at BEA Systems
.
- Follow-Ups:
- References:
- Prev by Date: Please Help - Java, Database oracle or sybase
- Next by Date: postgres i backup
- Previous by thread: Please Help - Java, Database oracle or sybase
- Next by thread: Re: Please Help - Java, Database oracle or sybase
- Index(es):
Relevant Pages
|