When is it better to store flags as a bitmask rather than using an associative table?

后端 未结 9 1101
滥情空心
滥情空心 2020-12-02 09:31

I’m working on an application where users have different permissions to use different features (e.g. Read, Create, Download, Print, Approve, etc.). The list of permissions i

9条回答
  •  误落风尘
    2020-12-02 10:16

    Your queries will run faster using a flags enumeration (bitmask), because you won't need to include a join to the associated table in order to make sense of the value.

提交回复
热议问题