Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java Databases > Class design fo...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 7 Topic 3595 of 3850
Post > Topic >>

Class design for DB code

by "Durango2008" <el_durang0@[EMAIL PROTECTED] > Nov 18, 2007 at 05:27 AM

Hi this is really not a Java specific question but more in regards to OO 
design in general.  I have an application which has access to multiple 
tables in a database and a multitude of different SQL statements for 
manipulating the many tables and retrieving data from them.  The part I am

struggling with is a good class design for the Java code which deals with 
the DB.
I would like to achieve the following:
1. Separating DB code from the main application code.
2. Reducing code redundancy
3. Managing SQL statements in a good way.

For the most part I can deal with items 1 and 2, however the managing of
SQL 
statements is the part that gets me.
There will be a huge number of different SQL statements needed for this 
project.
However to create a means of dynamically creating SQL statements can
become 
a bit over-complicated.
I also don't like to see a class filled with hard-coded SQL strings
waiting 
to be called, but it looks like it's the most practical means.

I am quite new to dealing with DB and although having used it before it
was 
rather sparce use of it.

If anyone knows my situation and can give me some advice I'd appreciate
it. 
If you need me to further clarify or give more info please let me know.

Thank you,
Peyman M.
 




 7 Posts in Topic:
Class design for DB code
"Durango2008" &  2007-11-18 05:27:23 
Re: Class design for DB code
Andrey Ryabov <andrey_  2007-11-17 23:42:18 
Re: Class design for DB code
David Harper <devnull@  2007-11-18 07:54:55 
Re: Class design for DB code
Andrey Ryabov <andrey_  2007-11-17 23:55:20 
Re: Class design for DB code
Andrey Ryabov <andrey_  2007-11-18 00:14:07 
Re: Class design for DB code
Doug Morse <morse@[EMA  2007-11-20 13:24:29 
Re: Class design for DB code
Andrey <andrey_ryabov@  2007-11-30 07:40:05 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Oct 11 16:31:16 CDT 2008.