We're pleased to have you here with us in the servlets forum, but there are a few rules that need to be followed, and one is that proper names are required. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.
In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.
Originally posted by satish kumar bairi: hi all, in my application i need to deal with different databases. can u suggest me which is the best way .
Its nearly impossible to design a large-scale application that works indepentently of the database being used. Sure, there are ways to make database transitions less painful, but its rare to find a system that can completely switch back and forth between database types with optimal performance.
Some of those ways are... using standard JDBC drivers and don't use any database-dependent calls. I good example of this is trying to determine whether an insert statement generated any keys. Any JDBC-provided solution is often non-standard. You could also try an object oriented model like JDO/Hibernate, but then you may be spending a lot of time updating XML files instead of Java Code.
The real problem is that often times, to achieve realistic performance, you are forced to write direct SQL statements that are DBMS specific. One solution for this is to use a factory pattern. For example, have a DAO interface and implement that interface for a specific database type. This is generally a very good solution although it means anytime you want to add a new database to the mix, you have to re-implement a new set of DAOs (which can be very time consuming). [ June 05, 2006: Message edited by: Scott Selikoff ]