TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Best way to handle user profile data?

3 pointsby chrisblackwellover 12 years ago
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?

1 comment

vividmindover 12 years ago
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.<p>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.
评论 #4823777 未加载