I have 3 MySQL tables for a membership system.
users
: Minimum requirement to be a user, only related to account info (email, password, is_activated, etc)user_profiles
: Personal information provided by the user (name, address, phone...)user_member_profiles
: Information strictly managed by admins (registration fee paid, meetings attended, etc.)
These could be condensed into one table, saving me headaches and keeping my code clean - but I feel like it's better to leave them separate as they serve slightly different purposes.
Option 1: Leave it this way and keep doing JOIN
s and tedious UPDATE
s (this piece of data goes to this table, this piece goes to another, etc.). More work for me, but maybe it makes more sense?
Option 2: Combine everything into one table.
I would assume using one table would be faster, no need to join tables. Maybe this depends on the data? Each table has about 12-20 fields, so the combined table would be large.
Each user has no more than 1 profile from each table, but may not even have a profile at all (or may have only 1 total).
To add a little context to this: It is for an ever-evolving CMS written in PHP which I will need to make tweaks to the tables for each installation. Admins need to manage members in a speadsheet-like way, so I will be selecting up to 200 users at a time.
What is the correct approach to this from a performance, design, or organization perspective?