On Fri, May 14, 2004 at 10:58:52AM +0200, Philippe de Rochambeau
<phil...@wwphi.net> wrote:
I would like to write Java classes that query a MySQL database. I plan
to use Tomcat as application server.
What is the easiest way to make access to the MySQL database as
object-oriented as possible? Is there some kind of pattern for this?
My initial guess is that I should create a Java class for each table
and manager classes with static methods to insert, delete, etc. rows
into the database tables. For instance,
I had a similar problem and ended up solving it by writing my own
DB layer, along with extensions to make it easy to use for web
development. See the org.infodancer.db package from the link
below.
http://www.infodancer.org/software/classes.jsp
svn://infodancer.org/classes
The documentation is very much "dive in, sink or swim", but at
least in my opinion it's worth it. Tested primarily with MySQL,
but I use it with MS-SQL Server 7 sometimes.