database access... what is the best approach

in a nutshell...

i have an applet that needs to access three data bases... currently i have it written and completed and working but the lag time on the database access is really slow so i am questioning my approach to the problem...

as a buisness rule we wanted to create classes to access the data through accessor mehtods from applications and appletts therfore standardizing our field name conventions, our methods and so on and so on...

so when the applett runs it creates an object for each class that access the database... when the user enters a valid "parcel number" the parcel is passed to the first class and the record is retrieved for database "A" and then it is passed to the next class and the supporting records are retrieved for data base "B" and it repeats the same concept for database "C".. so now i have the applet running and accessing the data through accessor methods through those objects...

each class makes the conection to the data base.. issues the sql, stores the results and closes the connection

i'll admit i am somewhat new to the java envirnoment so any help on concepts and approach would be most appreciated and useful

does this approach seem reasonable or am i letting my 15 years of procedural thinking get the best of me...

what would be the most effiecent way of doing this?

how much of a performance gain would i see if i threaded each one out on it's own thread and how would i do that?

the end product is going to be a county taxation system using browser technology as an inquiry system for public and general use and an application environment for inhouse data entry and use

creating seperate classes for each of the data basses seems ideal for what we want to do but maybe it is counterproductive considering the lag times.

i am using JDBC against an HP3000 image DataBase

[1901 byte] By [sputtertoad] at [2007-9-26 4:40:12]
# 1

With the information given that is the only possible approach.

You could provide a middle layer which would then handle some of the interactions for you. For instance by keeping a connection pool.

Additionally if your databases are not actually distributed (and the same vendor) then you could do most of the work in a stored procedure. You could also do this if some of the data is relatively static and by using a server side replication process.

jschell at 2007-6-29 18:01:29 > top of Java-index,Archived Forums,Java Programming...