Does database affect classes?
- by satyanarayana
I had created one class User and UserDAOImpl class for querying DB using class User. As there is one table to be queried, these two classes are sufficient for me.
What if there is a case where new fields are to be added to that one table is to be divided into 3 tables( user_info, user_profile and user_address) to store user?
As new fields are added, I need to change classes User and UserDAOImpl, it seems these two are not sufficient. It seems database changes affect my classes.
In this case, do I need to divide class User into 3 classes as tables are changes?
Can any one suggest me how can I solve this without making too many changes?