i was about to blurt out a solution, then i thought of a complication i couldn't immediately think around:
what would be a good way to allow users to switch companies, or be under multiple companies, while retaining which company a user was with for each claim? normalized of course. just adding company_id to each claim alongside the user_id seems.. wrong.
how about an employment table that tracks which company a user was under for a given time period, such as
Code:
table employments:
employment_id
company_id
user_id
start_date
end_date
that way a claim would reference an employee_id, users could be in multiple companies or change companies, but for a given claim you'd still know the user and company responsible.
is that on a better track?