Hi Mark et all
Im figuring out if someone can advise me about which is the best way to
create classes that interact with a database.
For example:
Currently I have a table "user" which contains username, password, name,
phone etc
and i have 2 java classes User and DB_User, the first one having only the
attributes related to user (most of them are taken from table definition),
and the second one receives a User object in the constructor and "fills"
information in that User, information of course retrieved from the db, ex.
"getPhone()".
so i dont know if this is the best way to programm these cases or if its
better to have only a class User that works as a normal object and also
interacts with a database when neccesary or something like that.
Thanx a lot, and any advise is really appreciated
Carlos
_________________________________________________________________
Help STOP SPAM: Try the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail