|
I guess that you should organize it like user groups in unix, but wih a little difference. Every user has unique id and may belong to one or more groups. Every group also has unique id. Every 'section' may be accessed by a number of certain groups.
In this case your tables will be like this:
users: id, name, ...
groups: id, name, ...
ug: user_id, group_id
sections: id, name, ...
sg: section_id, group_id, ...
For perfomance purposes you may cache section-user pairs in separate table and update it when user groups change or group is deleted.
|