in reply to How to implement user levels in web apps?
USER
GROUP1 (bool)
GROUP2 (bool)
etc.
Or a one-to-many setup:
USER
GROUPID
The advantage of the former system is there's only one record for each user. This means that selects should be slightly faster, though only if the number of groups is low - space requirements increase and efficiency drops if not.
The advantage of the latter system is it's modular - new groups can be added without heavily modifying the table - and it takes up very little space even when the number of groups is huge. However, it can become inefficient if most people are in most groups.
|
|---|