From your example I understood that you have 4 possible rights associated with user roles. So my suggestion is to have into a database a single "int" fields named "Rights" and to store each rights by using "bits fields" stored together in the same int value.
So in place of having 5 (but can be up to 32 or 64 depends on "int type") you could use only one integer field!
Some code example:
/// <summary>
/// Sets/Clear the specified right into the given user rights flag.
/// </summary>
/// <param name="rightsFlag">The user rights flag.</param>
/// <param name="right">The right.</param>
/// <param name="value">For true set the right, and for false clear the right.</param>
/// <returns>The modified user rights flag.</returns>
private static int SetRightsFlagRight(int rightsFlag, ShopRights right, bool value)
{
int flagValue = (int)Math.Pow(2.0, (int)right);
return (value ? (rightsFlag | flagValue) : (rightsFlag & ~flagValue));
}
/// <summary>
/// Checks the specified right for the given user rights flag.
/// </summary>
/// <param name="rightsFlag">The user rights flag.</param>
/// <param name="right">The right.</param>
/// <returns>True if the user has the specified right.</returns>
public static bool CheckRight(int rightsFlag, ShopRights right)
{
int flagValue = (int)Math.Pow(2.0, (int)right);
return (rightsFlag & flagValue) == flagValue;
}
And you should use an enum for bites fields like the next one:
public enum ShopRights
{
View = 0,
Edit = 1,
Add = 2,
Delete = 3,
}