I've attached the architecture of my project.
If I follow this arch, then each time i have have to connect to db and fetch a record which increases db hit count.
for eample i've to populate 3 dropdowns on page load from one table. But i've to select only the dsitinct values from db. for this i've to use 3 queries which selects from that column distinct values. Since there are 3 queries, as per my proj architechture i've to connect to db thrice.
This actually reducing my project's performance. Can someone please suggest me a suitable architechture which will reduce the db hit count.??
Does this mean that you have more than a blurry picture? It would be a great help if you could post code. If you do not have code yet, I personally would continue with your current plans and only optimize after you have a demonstrable problem.
I could interpret few things from pic but not sure if they are correct.
Here is my understanding.
You call servlet from jsp.
Then a Standard DAO class is called from Servlet.
Just few Hints:
Normally establishing the Database connection takes time, hence you can implement connection pooling and then access the connection in DAO.
Avoid singleton pattern for DAO.
Also use PreparedStatements if the queries are not adhoc.
Remember most of the times badly written queries cause more performance issues. Try tuning Queries by indexing and other methods.