I am designing a database for a system that has a users
table. Currently, the table has around 50 columns, which include:
- Personal information (e.g.,
name
,email
,phone_number
,address
, etc.) - Work-related information (e.g.,
job_title
,company_name
,years_experience
, etc.) - Education-related information (e.g.,
degree
,institution
,graduation_year
, etc.)
Some of these columns are only applicable to specific roles, like employees or students, while others are common to all users. I’m considering breaking the users
table into smaller tables, such as:
- A main
users
table for general information. - A
work_experiences
table for job-related details. - An
education
table for academic details.
My questions are:
- Is splitting the
users
table into smaller tables based on their context (work, education, etc.) a good practice? - Will this approach impact performance negatively, or is it better for maintainability?
- Should I consider alternatives like using JSON columns for role-specific data or polymorphic relationships for related models?
I’m using MySQL, and performance is a concern since the system will scale to thousands of users.
Thank you for your advice!