just a quick example of what i need to be clear:
lets say i have these tables:
users:
pk iduser
name
roles:
pk idroles
role_name
priviledges:
pk idpriv
priv_name
alright so i have an user: iduser=0, name=test
i have roles: 0=admin, 1=moderator, 2=member, 3=guest
so i would have another table to state a relationship:
user_role:
pk iduser_role
fk iduser
fk idroles
up until this point its pretty easy, each user will have one role, but then mr. priviledges joins the party.
we have these priviledges: 0=view, 1=post, 2=edit, 3=delete.
so now we need another relation table and this one is the one i dont quite understand, because using your method, i would have to do the following:
role_priviledge:
pk role_priviledge
fk idrole
fk idpriv
so if i want to give admins full rights, i would have to add 4 elements to that table, like
pk role_priviledge=0
fk idrole=0
fk idpriv=0
then one for fk idpriv=1, then one for 2 and one for 3.
this is the way that role_priviledge table would work, so if possible, i'd like it to work on a more efficient way, like admin has rights 0,1,2,3, all in one element.
the reason why i feel this is a need, is because if i had 100 roles, and 1000 priviledges, the role_priviledge table would be a hell to query and to understand.