class responsibilities in jdbc

If writing a program for jdbc access to a database I have written a class for each table. I have a class for the gui and tableEntry classes for each table.

(I think one improvement would be an abstract Entry class with inheriting classes for each table).

The table classes each have responisbility for saving themselves to the dbe.

Can anyone recommend an article (at beginner / intermediate level) that covers this particular modelling situation?

I have had a good deal of difficulty finding advice abt OO approaches to this in the sense of what responsibilities to assign to which classes.

Many links promise much but deliver little. A particularly good example of an article failing to deliver is here http://www.databasejournal.com/sqletc/article.php/1431601 where the writer promises ...

"So to conclude this tutorial on web databases, we will take a walk through JDBC technology and present an actual Java GUI that uses JDBC to connect to the datasource we installed for the"

and signally fails to do anything of the sort.

Brian

[1090 byte] By [nerak99a] at [2007-10-3 3:05:01]
# 1
http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html
sabre150a at 2007-7-14 20:55:05 > top of Java-index,Java Essentials,New To Java...
# 2

Well that is useful. Thankyou.

Looking for examples with actual code, I found "dukes bakery" useful and got it going with mysql and upgraded some bits to java 1.5. I thought it was good in that it was kept simple although the model is not in line with the design pattern given above.

Does anyone know of a more recent example application?

Brian

nerak99a at 2007-7-14 20:55:05 > top of Java-index,Java Essentials,New To Java...
# 3

> Does anyone know of a more recent example

> application?

>

I know of nothing published but there should be many and a Google for DAO should find them.

The problem I see with your approach is that it assumes that business objects map directly onto tables but it is my experience that they cross table boundaries. DAO fits in well with this.

sabre150a at 2007-7-14 20:55:05 > top of Java-index,Java Essentials,New To Java...
# 4
I see what you mean having read the pattern article. However, for some applications (such as video rental say) the business objects seem to map to tables pretty well and as a student that suits me at present.Thanks for the help.
nerak99a at 2007-7-14 20:55:05 > top of Java-index,Java Essentials,New To Java...