Tutorial :JDBC DAO - any good reference implementation?


Can anyone point me to a well written DAO using JDBC, that covers all the exceptions a DAO should handle.

I looked at some samples at java.sun.com, their blue prints but there is a lot of theory and less code.

Looking through Spring DAO source code will be enlightening but that's way too complicated for me.


Spring JdbcTemplate provides most plumbing you will need to implement a JDBC DAO.

Further Information at:



Spring framework comes to mind.


If you are looking for a more simple implementation, you should take a look here. However, a more complex sample is found here.

Hope it helps.


You can also refer in some ORM tools - like Hibernate, TopLink, Apache Cayenne etc. Sometimes ORM is very useful.


An example can be found at http://daoexamples.sourceforge.net/. Looking through Google's code search, I found this that has some DAOs. You may also want to do some research on generic DAOs, start here and here.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »