Hi All,
Currently i am using ORM through hibernate in a project where i have two options while designing my data models and its mapping with db tables.
1. Create the data models a replica copy of tables in db, so that while using hibernate i can easily map each row to a object in
java. but leads me to a large size of data in db. Which can be a performance hindrance parameter
after 1-2 years.
2. I can create data models by using my own explicit logic on objects obtained from db, in this case also i will use hibernate but i have to create my own new data models for internal functioning of application after using data from data models mapped to certain tables in db. This will even reduce size of my tables to a great extent and will not cause any performance hindrance but this will break the ORM
pattern partially because it will give be objects but i have to convert them into one useful for my application logic.
Please suggest me the write approach to be used.
Regards,
Ajay