I have a user table in postgress. Each user can have from 0 to many websites.
I know that it will be waste of memory to bring the user-websites everytime I get the user object from the database and of course I cant know how many websites the user will have.
I could have a table called websites but then I think this could happen again with other sorts of lists that I want to add under the user profile.
What is the best solution for this problem?
Note: Best meaning a solution that will not affect the performance of the website. FYI : the website will be running on ruby on rails 3