I am using PHP and MyISAM, currently I have a profile page for users and am unsure of how I should exactly lay out the tables.
I have tables for users (and every bit of their profile including a pair of MEDIUMTEXT fields for their long description or custom stylesheet,) a table for friends (userid+friendid) and of course a table for comments that may have been placed on their page.
Would it be wise to separate the profile/extra user data from the user table and purely use it for checking with the other tables?
I am unsure if many/or some long fields in each of the rows would be inappropriate if I were just checking for their friends to display or something on another page.
Short answer is maybe. Seperating the tables will save space because if the field is not used space will not be allocated. Space probably wont be a concern ( depending on the server and userbase ) but joining tables can slow performance down but again this depends on the userbase and the server. I think primary keys indexes are stored in memory so lookups shouldnt be affected by the number of columns / size of a row.
speed / performance … denormalize
space normalize