"Gordon Burditt" <go***********@burditt.org> wrote in message
news:11*************@corp.supernews.com...
Hi, I am creating a user name system in which each user is assigned 100
different types of
permissions.
How likely is it that the list of permissions will change, or the
*LIST* varies from one user to another? If either is likely, use
one row per user per permission. You may be able to save storage
by the convention that the absence of the row indicates the absence
of that type of permission.
Is it better to create a table with one row for each user
and 101 columns (1 for userid
and 100 for permission values) or 3 columns (1 for userid, 1 for
permission id, one for permission
value) and then 100 rows for each user or something else?
Gordon L. Burditt
I have already written code that makes it just as easy to add or edit a permission with either
structure and the list of permissions does not vary from one user to another as all users need to
have a value for each permission. So I guess it comes down to which type of query would return a
single users permissions faster.