| | |
jsp web app and database connections question
Please support our JSP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
I want to develop a web app that can allow the user to change the type of database he/she is using(Access, Sql Server, Oracle), just by changing the connection properties in a properties file.
I am assuming that this is possible.
Would it become too complicated meaning way too much work(its not for a client its just for the company), if there are differences in writing the sql statements depending on which database is used?
My big plan is that the app can be used with either of the above mentioned databases just by changing the connection properties.
Not sure if i have thought about all the implications.
Any comments or suggestions will be highly appreciated.
I am assuming that this is possible.
Would it become too complicated meaning way too much work(its not for a client its just for the company), if there are differences in writing the sql statements depending on which database is used?
My big plan is that the app can be used with either of the above mentioned databases just by changing the connection properties.
Not sure if i have thought about all the implications.
Any comments or suggestions will be highly appreciated.
This **seems** like a production level project.
Now considering using three different DBMSs', you will no doubt have to use three different drivers for each of the databases. First thing I suggest is is use a Type 4 Driver for each of the DBMSs (eg jtds for SQL Server, this for Oracle, etc) apart from MS Access for which I have not yet come across one (because the JDBC-ODBC bridge will give you the worst performance in terms of features as well as speed).
Next as the database changes, the driver that you choose to load (using Class.forName()) would also have to change, and with that the Connection URL would also change.
Next you would also have to limit yourself to using just the standard SQL features (SQL 92 if using SQL Server 2000) in order to avoid rewriting your SQL Statements again and again for each database.
These are just **some** of the things that come to mind that you will have to handle.
Now considering using three different DBMSs', you will no doubt have to use three different drivers for each of the databases. First thing I suggest is is use a Type 4 Driver for each of the DBMSs (eg jtds for SQL Server, this for Oracle, etc) apart from MS Access for which I have not yet come across one (because the JDBC-ODBC bridge will give you the worst performance in terms of features as well as speed).
Next as the database changes, the driver that you choose to load (using Class.forName()) would also have to change, and with that the Connection URL would also change.
Next you would also have to limit yourself to using just the standard SQL features (SQL 92 if using SQL Server 2000) in order to avoid rewriting your SQL Statements again and again for each database.
These are just **some** of the things that come to mind that you will have to handle.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
"How to ask questions the smart way ?"
"How to ask questions the smart way ?"
![]() |
Other Threads in the JSP Forum
- Previous Thread: I want to add search box to my website
- Next Thread: Need some urgent help in jsp please!
| Thread Tools | Search this Thread |
apache backbutton combobox connection database development directorystructure dynamicpagetitles eclipse frames glassfish ie8 imagetodatabse imageupload integer internet java javaee javascript jsf jsp jsppagetitles levels mvc2 mvcmodel2 network parameters passing ping printinserverinsteadofclient redirect request.getparameter response servlet servletdopost()readxml sessions software ssl state_saving_method stocks sun tomcat tutorial update video web






