I have read the following question regarding whether it is best to use objects with fully or partially populated data members. The 3 suggestions were:
- that perhaps using a fully populated ORM model may not have as much overhead as you might expect (testing requried);
- an incorrect model was being used if only a limited number of items were being populated, and;
- use a 'lite' function or entire class/model to access the pieces of information that are needed.
I cannot tell whether the following solution is using the second or the third suggestion, or more likely, neither:
Example / Solution: Using a table for user information, with each row being a user and storing their user information. For most page views, only 3 out of 12 columns are needed to customize the page for the user. Does it make sense to copy these pieces of information over to another table which holds other relevant session information and is also accessed during every pageload? In this case, there is data duplication but for most tasks a single row is fetched with all relevant information. At the end of the session, this row is removed.