Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7672521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T16:18:18+00:00 2026-05-31T16:18:18+00:00

I am working on a user based social network. I am building the site

  • 0

I am working on a user based social network. I am building the site in PHP and I want to use a MySQL database to store user data. I can create databases/tables no problem (I use phpMyAdmin)
I am not sure how many tables are necessary and what would be more practical for my web application. Would it be smart to have many tables? For example, a USERS table. With column names USER_ID, EMAIL, PASSWORD, LAST_LOGIN and then a table named USER_SETTINGS that would hold the account settings for each user, and another table named POSTS with the names and values attributed to a “status update”. Or is smart to have everything in one table? What is the best practice?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T16:18:20+00:00Added an answer on May 31, 2026 at 4:18 pm

    Definately do NOT keep “everything in one table”. You’ll likely end up with “many tables”, but that sounds bad – basically, you should segment your data based on logical usage.

    For instance, if you DID keep posts in the users table – how would that work? What happens when they make a new post – would you add another field? (bad) – or add another item TO a field and separate by a character (bad)…etc. The only real way to do it is to have another table. You should definitely NOT keep posts in the same table as users.

    As far as ‘profile data’ (or whatever you want to call it), I like to keep it separate – some people like to keep it in the users table – matter of preference there.

    In your case, I’d suggest something like this:

    //users table
    id,
    email,
    password,
    last_login,
    //...
    
    //profiles table
    id,
    user_id,
    profile,
    age,
    gender,
    //...
    
    //posts table
    id,
    user_id,
    data,
    created (datetime),
    modified (datetime)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Am working on web based Job search application using Lucene.User on my site can
Background: working a user q&a site where users logged,etc. What user/visitor data should be
I'm working on a user based, social networking type of web application in Django.
I am working on a view that selects an image (chart) based on user
I am working on a project which is based on an FTP user with
I am working on a user-role / permission system in PHP for a script.
I'm working on a site that's grown both in terms of user-base and functionality
I am working on building a website to be used in a social science
Folks, I'm working on a certificate authentication app that will authenticate user based on
I have to do a simple calculator in php based on user's input and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.