

Ask HN: Best way to handle user profile data? - chrisblackwell

Almost every web application now allows you to setup a basic profile (Even Stack Exchange does). The question is how should you be storing the data in your database?<p>Should you just add more columns to your users database table, or should you setup another table called user_profiles that has a foreign key of user_id?
======
vividmind
I think it depends on: a) potential number of users you are going to have in
your table b) number of times you use that data in joins etc.

I think in the majority of cases you can have that data in one table (although
you will most likely require normalization for some other types of info -
address, contacts, etc.). I would only think about moving some columns out of
users table if they are too heavy and I have many millions of users.

~~~
mcrider
What do you mean by 'too heavy'? I'm not sure how moving the data to another
table would help if you have a lot of users. I would use a user_profiles table
if I wanted values to be localized (different values for different languages),
but couldn't see a good reason otherwise.

