I'm developing an application in Laravel 4.2 with a MySQL DB. I have the 'users', 'roles_users', and 'roles' tables, with 'role_user' being the pivot table because of the many-to-many relationship. Now, in my application there will be different types of accounts. Some types need to have an extra field unique to them. That field is a foreign key field, linking the type of account to a specific table.
Example:
- Type A Account: has access to all areas
- Type B Account: has access to only 1 area and its sub-areas.
- Type C account: has access to only 1 sub-area.
So, there would be an 'areas' table and a 'sub-areas' table, with extra information. For Account Type A, I would need no extra fields. For B, I would need an 'area_id' field, and for C a 'sub-area_id' field. Where would those fields go? I don't think it would be the 'users' table, since they aren't common fields.
If you need extra information, let me know and I'll do my best to help.